File: /var/www/html/wpbiancoarte/wp-content/plugins/qi-blocks/assets/dist/advanced-column.js
(()=>{var e={2:(e,t,l)=>{var n=l(4335)(Object.keys,Object);e.exports=n},80:(e,t,l)=>{var n=l(6025),a=Array.prototype.splice;e.exports=function(e){var t=this.__data__,l=n(t,e);return!(l<0)&&(l==t.length-1?t.pop():a.call(t,l,1),--this.size,!0)}},270:(e,t,l)=>{var n=l(7068),a=l(346);e.exports=function e(t,l,o,r,i){return t===l||(null==t||null==l||!a(t)&&!a(l)?t!=t&&l!=l:n(t,l,o,r,e,i))}},294:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},689:(e,t,l)=>{var n=l(2),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,l,o,r,i){var s=1&l,c=n(e),u=c.length;if(u!=n(t).length&&!s)return!1;for(var p=u;p--;){var m=c[p];if(!(s?m in t:a.call(t,m)))return!1}var b=i.get(e),d=i.get(t);if(b&&d)return b==t&&d==e;var f=!0;i.set(e,t),i.set(t,e);for(var g=s;++p<u;){var h=e[m=c[p]],k=t[m];if(o)var _=s?o(k,h,m,t,e,i):o(h,k,m,e,t,i);if(!(void 0===_?h===k||r(h,k,l,o,i):_)){f=!1;break}g||(g="constructor"==m)}if(f&&!g){var v=e.constructor,w=t.constructor;v==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof w&&w instanceof w||(f=!1)}return i.delete(e),i.delete(t),f}},828:(e,t,l)=>{var n=l(7556);e.exports=function(e){return null==e?"":n(e)}},882:e=>{e.exports=function(e,t,l,n){var a=-1,o=null==e?0:e.length;for(n&&o&&(l=e[++a]);++a<o;)l=t(l,e[a],a,e);return l}},999:(e,t,l)=>{var n=l(9302),a=l(6800);e.exports=function(e){return n(function(t,l){var n=-1,o=l.length,r=o>1?l[o-1]:void 0,i=o>2?l[2]:void 0;for(r=e.length>3&&"function"==typeof r?(o--,r):void 0,i&&a(l[0],l[1],i)&&(r=o<3?void 0:r,o=1),t=Object(t);++n<o;){var s=l[n];s&&e(t,s,n,r)}return t})}},1033:e=>{e.exports=function(e,t,l){switch(l.length){case 0:return e.call(t);case 1:return e.call(t,l[0]);case 2:return e.call(t,l[0],l[1]);case 3:return e.call(t,l[0],l[1],l[2])}return e.apply(t,l)}},1074:e=>{e.exports=function(e){return e.split("")}},1175:(e,t,l)=>{var n=l(6025);e.exports=function(e,t){var l=this.__data__,a=n(l,e);return a<0?(++this.size,l.push([e,t])):l[a][1]=t,this}},1331:(e,t,l)=>{var n=l(2552),a=l(8879),o=l(346),r=Function.prototype,i=Object.prototype,s=r.toString,c=i.hasOwnProperty,u=s.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=n(e))return!1;var t=a(e);if(null===t)return!0;var l=c.call(t,"constructor")&&t.constructor;return"function"==typeof l&&l instanceof l&&s.call(l)==u}},1489:e=>{e.exports=function(e){return e}},1733:e=>{var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},1791:(e,t,l)=>{var n=l(6547),a=l(3360);e.exports=function(e,t,l,o){var r=!l;l||(l={});for(var i=-1,s=t.length;++i<s;){var c=t[i],u=o?o(l[c],e[c],c,l,e):void 0;void 0===u&&(u=e[c]),r?a(l,c,u):n(l,c,u)}return l}},1882:(e,t,l)=>{var n=l(2552),a=l(3805);e.exports=function(e){if(!a(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1961:(e,t,l)=>{var n=l(9653);e.exports=function(e,t){var l=t?n(e.buffer):e.buffer;return new e.constructor(l,e.byteOffset,e.length)}},1986:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},2054:e=>{var t="\\ud800-\\udfff",l="["+t+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",a="\\ud83c[\\udffb-\\udfff]",o="[^"+t+"]",r="(?:\\ud83c[\\udde6-\\uddff]){2}",i="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+n+"|"+a+")"+"?",c="[\\ufe0e\\ufe0f]?",u=c+s+("(?:\\u200d(?:"+[o,r,i].join("|")+")"+c+s+")*"),p="(?:"+[o+n+"?",n,r,i,l].join("|")+")",m=RegExp(a+"(?="+a+")|"+p+u,"g");e.exports=function(e){return e.match(m)||[]}},2225:e=>{var t="\\ud800-\\udfff",l="\\u2700-\\u27bf",n="a-z\\xdf-\\xf6\\xf8-\\xff",a="A-Z\\xc0-\\xd6\\xd8-\\xde",o="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",r="["+o+"]",i="\\d+",s="["+l+"]",c="["+n+"]",u="[^"+t+o+i+l+n+a+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",b="["+a+"]",d="(?:"+c+"|"+u+")",f="(?:"+b+"|"+u+")",g="(?:['’](?:d|ll|m|re|s|t|ve))?",h="(?:['’](?:D|LL|M|RE|S|T|VE))?",k="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",_="[\\ufe0e\\ufe0f]?",v=_+k+("(?:\\u200d(?:"+["[^"+t+"]",p,m].join("|")+")"+_+k+")*"),w="(?:"+[s,p,m].join("|")+")"+v,y=RegExp([b+"?"+c+"+"+g+"(?="+[r,b,"$"].join("|")+")",f+"+"+h+"(?="+[r,b+d,"$"].join("|")+")",b+"?"+d+"+"+g,b+"+"+h,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",i,w].join("|"),"g");e.exports=function(e){return e.match(y)||[]}},2404:(e,t,l)=>{var n=l(270);e.exports=function(e,t){return n(e,t)}},2428:e=>{e.exports=function(){return!1}},2507:(e,t,l)=>{var n=l(8754),a=l(9698),o=l(3912),r=l(3222);e.exports=function(e){return function(t){t=r(t);var l=a(t)?o(t):void 0,i=l?l[0]:t.charAt(0),s=l?n(l,1).join(""):t.slice(1);return i[e]()+s}}},2523:e=>{e.exports=function(e,t,l,n){for(var a=e.length,o=l+(n?1:-1);n?o--:++o<a;)if(t(e[o],o,e))return o;return-1}},2552:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},2824:(e,t,l)=>{var n=l(7805),a=l(3290),o=l(1961),r=l(3007),i=l(5529),s=l(2428),c=l(6449),u=l(3693),p=l(3656),m=l(1882),b=l(3805),d=l(1331),f=l(7167),g=l(4974),h=l(9884);e.exports=function(e,t,l,k,_,v,w){var y=g(e,l),A=g(t,l),S=w.get(A);if(S)n(e,l,S);else{var q=v?v(y,A,l+"",e,t,w):void 0,E=void 0===q;if(E){var x=c(A),I=!x&&p(A),T=!x&&!I&&f(A);q=A,x||I||T?c(y)?q=y:u(y)?q=r(y):I?(E=!1,q=a(A,!0)):T?(E=!1,q=o(A,!0)):q=[]:d(A)||s(A)?(q=y,s(y)?q=h(y):b(y)&&!m(y)||(q=i(A))):E=!1}E&&(w.set(A,q),_(q,A,k,v,w),w.delete(A)),n(e,l,q)}}},2865:e=>{e.exports=function(e){return e}},3007:e=>{e.exports=function(e,t){var l=-1,n=e.length;for(t||(t=Array(n));++l<n;)t[l]=e[l];return t}},3221:e=>{e.exports=function(e){return function(t,l,n){for(var a=-1,o=Object(t),r=n(t),i=r.length;i--;){var s=r[e?i:++a];if(!1===l(o[s],s,o))break}return t}}},3222:e=>{e.exports=function(e){return e}},3243:(e,t,l)=>{var n=l(6110),a=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=a},3290:(e,t,l)=>{e=l.nmd(e);var n=l(9325),a=t&&!t.nodeType&&t,o=a&&e&&!e.nodeType&&e,r=o&&o.exports===a?n.Buffer:void 0,i=r?r.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var l=e.length,n=i?i(l):new e.constructor(l);return e.copy(n),n}},3360:(e,t,l)=>{var n=l(3243);e.exports=function(e,t,l){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:l,writable:!0}):e[t]=l}},3488:e=>{e.exports=function(e){return e}},3656:e=>{e.exports=function(){return!1}},3693:(e,t,l)=>{var n=l(4894),a=l(346);e.exports=function(e){return a(e)&&n(e)}},3702:e=>{e.exports=function(){this.__data__=[],this.size=0}},3805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3912:(e,t,l)=>{var n=l(1074),a=l(9698),o=l(2054);e.exports=function(e){return a(e)?o(e):n(e)}},4058:(e,t,l)=>{var n=l(4792),a=l(5539)(function(e,t,l){return t=t.toLowerCase(),e+(l?n(t):t)});e.exports=a},4248:e=>{e.exports=function(e,t){for(var l=-1,n=null==e?0:e.length;++l<n;)if(t(e[l],l,e))return!0;return!1}},4335:e=>{e.exports=function(e,t){return function(l){return e(t(l))}}},4713:(e,t,l)=>{var n=l(2523),a=l(5389),o=l(1489),r=Math.max;e.exports=function(e,t,l){var i=null==e?0:e.length;if(!i)return-1;var s=null==l?0:o(l);return s<0&&(s=r(i+s,0)),n(e,a(t,3),s)}},4739:(e,t,l)=>{var n=l(6025);e.exports=function(e){var t=this.__data__,l=n(t,e);return l<0?void 0:t[l][1]}},4792:(e,t,l)=>{var n=l(3222),a=l(5808);e.exports=function(e){return a(n(e).toLowerCase())}},4840:(e,t,l)=>{var n="object"==typeof l.g&&l.g&&l.g.Object===Object&&l.g;e.exports=n},4894:(e,t,l)=>{var n=l(1882),a=l(294);e.exports=function(e){return null!=e&&a(e.length)&&!n(e)}},4974:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},5160:e=>{e.exports=function(e,t,l){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(l=l>a?a:l)<0&&(l+=a),a=t>l?0:l-t>>>0,t>>>=0;for(var o=Array(a);++n<a;)o[n]=e[n+t];return o}},5250:(e,t,l)=>{var n=l(7217),a=l(7805),o=l(6649),r=l(2824),i=l(3805),s=l(7241),c=l(4974);e.exports=function e(t,l,u,p,m){t!==l&&o(l,function(o,s){if(m||(m=new n),i(o))r(t,l,s,u,e,p,m);else{var b=p?p(c(t,s),o,s+"",t,l,m):void 0;void 0===b&&(b=o),a(t,s,b)}},s)}},5287:(e,t)=>{"use strict";var l=Symbol.for("react.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),b=Symbol.iterator;var d={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f=Object.assign,g={};function h(e,t,l){this.props=e,this.context=t,this.refs=g,this.updater=l||d}function k(){}function _(e,t,l){this.props=e,this.context=t,this.refs=g,this.updater=l||d}h.prototype.isReactComponent={},h.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},h.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},k.prototype=h.prototype;var v=_.prototype=new k;v.constructor=_,f(v,h.prototype),v.isPureReactComponent=!0;var w=Array.isArray,y=Object.prototype.hasOwnProperty,A={current:null},S={key:!0,ref:!0,__self:!0,__source:!0};function q(e,t,n){var a,o={},r=null,i=null;if(null!=t)for(a in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(r=""+t.key),t)y.call(t,a)&&!S.hasOwnProperty(a)&&(o[a]=t[a]);var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){for(var c=Array(s),u=0;u<s;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(a in s=e.defaultProps)void 0===o[a]&&(o[a]=s[a]);return{$$typeof:l,type:e,key:r,ref:i,props:o,_owner:A.current}}function E(e){return"object"==typeof e&&null!==e&&e.$$typeof===l}var x=/\/+/g;function I(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function T(e,t,a,o,r){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var s=!1;if(null===e)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case l:case n:s=!0}}if(s)return r=r(s=e),e=""===o?"."+I(s,0):o,w(r)?(a="",null!=e&&(a=e.replace(x,"$&/")+"/"),T(r,t,a,"",function(e){return e})):null!=r&&(E(r)&&(r=function(e,t){return{$$typeof:l,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(r,a+(!r.key||s&&s.key===r.key?"":(""+r.key).replace(x,"$&/")+"/")+e)),t.push(r)),1;if(s=0,o=""===o?".":o+":",w(e))for(var c=0;c<e.length;c++){var u=o+I(i=e[c],c);s+=T(i,t,a,u,r)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=b&&e[b]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),c=0;!(i=e.next()).done;)s+=T(i=i.value,t,a,u=o+I(i,c++),r);else if("object"===i)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function C(e,t,l){if(null==e)return e;var n=[],a=0;return T(e,n,"","",function(e){return t.call(l,e,a++)}),n}function B(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var N={current:null},P={transition:null};function O(){throw Error("act(...) is not supported in production builds of React.")}t.createElement=q},5288:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},5364:(e,t,l)=>{var n=l(5250),a=l(999)(function(e,t,l){n(e,t,l)});e.exports=a},5389:e=>{e.exports=function(e){return e}},5434:e=>{var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},5527:e=>{e.exports=function(){return!1}},5529:(e,t,l)=>{var n=l(9344),a=l(8879),o=l(5527);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:n(a(e))}},5539:(e,t,l)=>{var n=l(882),a=l(828),o=l(6645),r=RegExp("['’]","g");e.exports=function(e){return function(t){return n(o(a(t).replace(r,"")),e,"")}}},5808:(e,t,l)=>{var n=l(2507)("toUpperCase");e.exports=n},5861:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5911:(e,t,l)=>{var n=l(8859),a=l(4248),o=l(9219);e.exports=function(e,t,l,r,i,s){var c=1&l,u=e.length,p=t.length;if(u!=p&&!(c&&p>u))return!1;var m=s.get(e),b=s.get(t);if(m&&b)return m==t&&b==e;var d=-1,f=!0,g=2&l?new n:void 0;for(s.set(e,t),s.set(t,e);++d<u;){var h=e[d],k=t[d];if(r)var _=c?r(k,h,d,t,e,s):r(h,k,d,e,t,s);if(void 0!==_){if(_)continue;f=!1;break}if(g){if(!a(t,function(e,t){if(!o(g,t)&&(h===e||i(h,e,l,r,s)))return g.push(t)})){f=!1;break}}else if(h!==k&&!i(h,k,l,r,s)){f=!1;break}}return s.delete(e),s.delete(t),f}},6025:(e,t,l)=>{var n=l(5288);e.exports=function(e,t){for(var l=e.length;l--;)if(n(e[l][0],t))return l;return-1}},6110:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},6131:e=>{e.exports=function(e,t,l){for(var n=l-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}},6449:e=>{var t=Array.isArray;e.exports=t},6540:(e,t,l)=>{"use strict";e.exports=l(5287)},6547:(e,t,l)=>{var n=l(3360),a=l(5288),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,l){var r=e[t];o.call(e,t)&&a(r,l)&&(void 0!==l||t in e)||n(e,t,l)}},6645:(e,t,l)=>{var n=l(1733),a=l(5434),o=l(3222),r=l(2225);e.exports=function(e,t,l){return e=o(e),void 0===(t=l?void 0:t)?a(e)?r(e):n(e):e.match(t)||[]}},6649:(e,t,l)=>{var n=l(3221)();e.exports=n},6757:(e,t,l)=>{var n=l(1033),a=Math.max;e.exports=function(e,t,l){return t=a(void 0===t?e.length-1:t,0),function(){for(var o=arguments,r=-1,i=a(o.length-t,0),s=Array(i);++r<i;)s[r]=o[t+r];r=-1;for(var c=Array(t+1);++r<t;)c[r]=o[r];return c[t]=l(s),n(e,this,c)}}},6800:e=>{e.exports=function(){return!1}},6942:(e,t)=>{var l;!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var e="",t=0;t<arguments.length;t++){var l=arguments[t];l&&(e=r(e,o(l)))}return e}function o(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return a.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var l in e)n.call(e,l)&&e[l]&&(t=r(t,l));return t}function r(e,t){return t?e?e+" "+t:e+t:e}e.exports?(a.default=a,e.exports=a):void 0===(l=function(){return a}.apply(t,[]))||(e.exports=l)}()},7068:(e,t,l)=>{var n=l(7217),a=l(5911),o=l(1986),r=l(689),i=l(5861),s=l(6449),c=l(3656),u=l(7167),p="[object Arguments]",m="[object Array]",b="[object Object]",d=Object.prototype.hasOwnProperty;e.exports=function(e,t,l,f,g,h){var k=s(e),_=s(t),v=k?m:i(e),w=_?m:i(t),y=(v=v==p?b:v)==b,A=(w=w==p?b:w)==b,S=v==w;if(S&&c(e)){if(!c(t))return!1;k=!0,y=!1}if(S&&!y)return h||(h=new n),k||u(e)?a(e,t,l,f,g,h):o(e,t,v,l,f,g,h);if(!(1&l)){var q=y&&d.call(e,"__wrapped__"),E=A&&d.call(t,"__wrapped__");if(q||E){var x=q?e.value():e,I=E?t.value():t;return h||(h=new n),g(x,I,l,f,h)}}return!!S&&(h||(h=new n),r(e,t,l,f,g,h))}},7167:e=>{e.exports=function(){return!1}},7217:(e,t,l)=>{var n=l(3702),a=l(80),o=l(4739),r=l(8655),i=l(1175);function s(e){var t=-1,l=null==e?0:e.length;for(this.clear();++t<l;){var n=e[t];this.set(n[0],n[1])}}s.prototype.clear=n,s.prototype.delete=a,s.prototype.get=o,s.prototype.has=r,s.prototype.set=i,e.exports=s},7241:e=>{e.exports=function(e){var t=[];if(null!=e)for(var l in Object(e))t.push(l);return t}},7556:e=>{e.exports=function(e){return e}},7805:(e,t,l)=>{var n=l(3360),a=l(5288);e.exports=function(e,t,l){(void 0!==l&&!a(e[t],l)||void 0===l&&!(t in e))&&n(e,t,l)}},7828:(e,t,l)=>{var n=l(9325).Uint8Array;e.exports=n},8655:(e,t,l)=>{var n=l(6025);e.exports=function(e){return n(this.__data__,e)>-1}},8754:(e,t,l)=>{var n=l(5160);e.exports=function(e,t,l){var a=e.length;return l=void 0===l?a:l,!t&&l>=a?e:n(e,t,l)}},8859:(e,t,l)=>{var n=l(6449);e.exports=function(){if(!arguments.length)return[];var e=arguments[0];return n(e)?e:[e]}},8879:(e,t,l)=>{var n=l(4335)(Object.getPrototypeOf,Object);e.exports=n},9219:(e,t,l)=>{var n=l(6131);e.exports=function(e,t){return!!(null==e?0:e.length)&&n(e,t,0)>-1}},9302:(e,t,l)=>{var n=l(3488),a=l(6757),o=l(2865);e.exports=function(e,t){return o(a(e,t,n),e+"")}},9325:(e,t,l)=>{var n=l(4840),a="object"==typeof self&&self&&self.Object===Object&&self,o=n||a||Function("return this")();e.exports=o},9344:(e,t,l)=>{var n=l(3805),a=Object.create,o=function(){function e(){}return function(t){if(!n(t))return{};if(a)return a(t);e.prototype=t;var l=new e;return e.prototype=void 0,l}}();e.exports=o},9653:(e,t,l)=>{var n=l(7828);e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},9698:e=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},9884:(e,t,l)=>{var n=l(1791),a=l(7241);e.exports=function(e){return n(e,a(e))}}},t={};function l(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n](o,o.exports,l),o.loaded=!0,o.exports}l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";const e=wp.i18n,t=wp.blocks;var n=l(5364),a=l.n(n),o=l(4713),r=l.n(o);const i=wp.element,s=wp.blockEditor,c=wp.components,u=wp.compose,p=wp.data,m=wp.hooks;var b=l(6942),d=l.n(b);var f,g=l(6540);function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var n in l)({}).hasOwnProperty.call(l,n)&&(e[n]=l[n])}return e},h.apply(null,arguments)}const k=e=>g.createElement("svg",h({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 24 24"},e),f||(f=g.createElement("path",{d:"M13 18h2c.6 0 1 .4 1 1s-.4 1-1 1H9c-.6 0-1-.4-1-1s.4-1 1-1h2v-2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h16c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2h-7zM4 6v8h16V6z"})));var _;function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var n in l)({}).hasOwnProperty.call(l,n)&&(e[n]=l[n])}return e},v.apply(null,arguments)}const w=e=>g.createElement("svg",v({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 24 24"},e),_||(_=g.createElement("path",{d:"M6 4v15h12V4zm0-2h12c1.1 0 2 .9 2 2v16c0 1.1-.9 2-2 2H6c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2"})));var y;function A(){return A=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var n in l)({}).hasOwnProperty.call(l,n)&&(e[n]=l[n])}return e},A.apply(null,arguments)}const S=e=>g.createElement("svg",A({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 24 24"},e),y||(y=g.createElement("path",{d:"M8 2h8c1.1 0 2 .9 2 2v16c0 1.1-.9 2-2 2H8c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2m0 2v15h8V4z"}))),q="desktop",E={desktop:{label:(0,e.__)("Desktop","qi-blocks"),icon:wp.element.createElement(k,null)},tablet:{label:(0,e.__)("Tablet","qi-blocks"),icon:wp.element.createElement(w,null)},mobile:{label:(0,e.__)("Mobile","qi-blocks"),icon:wp.element.createElement(S,null)}};let x=q;const I=()=>x;var T=l(4058),C=l.n(T);const B=e=>{const t={...e},{blockAttributeKey:l,blockAttributes:n,setAttributes:a,repeater:o,repeaterItemIndex:r,repeaterItemKey:i,repeaterSetAttributes:s,repeaterGetAttributes:u}=t;return t.getAttributeValue=()=>{let e=n[l];return o&&(e=u(i,r)),e||!1},t.setAttributeValue=e=>{o?s(i,e,r):a({[l]:e})},wp.element.createElement("div",{className:"qodef-on-off-option"},wp.element.createElement(c.ToggleControl,{label:t.label,help:t.help,checked:t.getAttributeValue(),onChange:()=>t.setAttributeValue(!t.getAttributeValue())}))};B.defaultProps={label:(0,e.__)("Show","qi-blocks"),help:"",blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const N=B,P=[{classSuffix:"desktop",label:(0,e.__)("Hide On Desktop","qi-blocks"),blockAttributeKey:"hideOnDesktop"},{classSuffix:"tablet",label:(0,e.__)("Hide On Tablet","qi-blocks"),blockAttributeKey:"hideOnTablet"},{classSuffix:"mobile",label:(0,e.__)("Hide On Mobile","qi-blocks"),blockAttributeKey:"hideOnMobile"}],O=e=>{const t={...e},{label:l,description:n,blockAttributeKeys:a,blockAttributes:o,setAttributes:r}=t;return wp.element.createElement("div",{className:"qodef-visibility-group-option"},l&&wp.element.createElement("label",{className:"qodef-option-label"},l),n&&wp.element.createElement("p",{className:"qodef-option-description"},n),a.map(e=>wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(N,{label:e.label,blockAttributeKey:e.blockAttributeKey,blockAttributes:o,setAttributes:r}))))};O.defaultProps={label:(0,e.__)("Visibility","qi-blocks"),description:(0,e.__)("Responsive visibility will take effect only on preview or live page, and not while editing in Gutenberg.","qi-blocks"),blockAttributeKeys:P,blockAttributes:{},setAttributes:()=>{}};const D=()=>({hideOnDesktop:{type:"boolean",default:!1},hideOnTablet:{type:"boolean",default:!1},hideOnMobile:{type:"boolean",default:!1}}),V=e=>{const{attrNameTemplate:t,attrName:l}=e,n=e=>le(t,l,e),a=!ue(e,"all")||(e.allowUnitControl??!0),o=ue(e,"all")&&e.disableDirections||[];let r={};return["Top","Right","Bottom","Left"].map(e=>{o.includes(e)||(r[n(e)]={type:"number",default:""},r[n(e+"Tablet")]={type:"number",default:""},r[n(e+"Mobile")]={type:"number",default:""},a&&(r[n(`${e}Decimal`)]={type:"number",default:""},r[n(`${e}DecimalTablet`)]={type:"number",default:""},r[n(`${e}DecimalMobile`)]={type:"number",default:""}))}),r[n("Unit")]={type:"string",default:"px"},r[n("UnitTablet")]={type:"string",default:"px"},r[n("UnitMobile")]={type:"string",default:"px"},r};V.defaultProps={attrNameTemplate:"",attrName:"",allowUnitControl:!0};const R=V,M=e=>{const{blockAttributeKey:t}=e,l=!!ue(e,"all")&&(e.allowScreens??!1),n=!ue(e,"all")||(e.allowUnits??!0),a=ue(e,"all")&&e.optionType||"integer",o=ue(e,"all")&&e.defaultValue||"",r="decimal"===a?o:"";let i={};return"integer"===a&&(i[t]={type:"number",default:o}),i[le(t,"Unit")]={type:"string",default:"px"},(n||"decimal"===a)&&(i[le(t,"Decimal")]={type:"number",default:r}),l&&(i[le(t,"Tablet")]={type:"number",default:""},i[le(t,"Mobile")]={type:"number",default:""},i[le(t,"UnitTablet")]={type:"string",default:"px"},i[le(t,"UnitMobile")]={type:"string",default:"px"},n&&(i[le(t,"DecimalTablet")]={type:"number",default:""},i[le(t,"DecimalMobile")]={type:"number",default:""})),i};M.defaultProps={allowScreens:!1,allowUnits:!0};const L=M,z=e=>{const t=ue(e,"all")&&e.attrNameTemplate||"",l=ue(e,"all")&&e.attrName||"Background",n=e=>le(t,l+e),a=L({blockAttributeKey:n("XPosition"),allowScreens:!0}),o=L({blockAttributeKey:n("YPosition"),allowScreens:!0}),r=L({blockAttributeKey:n("SizeWidth"),allowScreens:!0});return{[n("Image")]:{type:"object",default:{id:null,url:"",alt:"",caption:""}},[n("ImageTablet")]:{type:"object",default:{id:null,url:"",alt:"",caption:""}},[n("ImageMobile")]:{type:"object",default:{id:null,url:"",alt:"",caption:""}},[n("Position")]:{type:"string",default:""},[n("PositionTablet")]:{type:"string",default:""},[n("PositionMobile")]:{type:"string",default:""},...a,...o,[n("Attachment")]:{type:"string",default:""},[n("Repeat")]:{type:"string",default:""},[n("RepeatTablet")]:{type:"string",default:""},[n("RepeatMobile")]:{type:"string",default:""},[n("Size")]:{type:"string",default:""},[n("SizeTablet")]:{type:"string",default:""},[n("SizeMobile")]:{type:"string",default:""},...r}};z.defaultProps={attrNameTemplate:"",attrName:"Background"};const U=z,F=e=>{const t=ue(e,"all")&&e.attrNameTemplate||"",l=e=>le(t,e),n=!!ue(e,"all")&&(e.includeVideoBG??!1),a=U({attrNameTemplate:t});let o={[l("BackgroundType")]:{type:"string",default:""},[l("BackgroundColor")]:{type:"string",default:""},...a,[l("BackgroundGradientColor1")]:{type:"string",default:""},[l("BackgroundGradientLocation1")]:{type:"number",default:""},[l("BackgroundGradientColor2")]:{type:"string",default:""},[l("BackgroundGradientLocation2")]:{type:"number",default:""},[l("BackgroundGradientType")]:{type:"string",default:"linear"},[l("BackgroundGradientTypeAngle")]:{type:"number",default:""},[l("BackgroundGradientTypePosition")]:{type:"string",default:"center center"}};if(n){const e={[l("BackgroundVideoLink")]:{type:"object",default:{id:null,url:"",alt:""}},[l("BackgroundVideoStartTime")]:{type:"number",default:""},[l("BackgroundVideoEndTime")]:{type:"number",default:""},[l("BackgroundVideoStartTime")]:{type:"number",default:""},[l("BackgroundVideoPlayOnce")]:{type:"boolean",default:!1},[l("BackgroundVideoPlayOnMobile")]:{type:"boolean",default:!1},[l("BackgroundVideoFallbackImage")]:{type:"object",default:{id:null,url:"",alt:""}}};o={...o,...e}}return o};F.defaultProps={attrNameTemplate:"",includeVideoBG:!1};const j=F,K=e=>{const t=ue(e,"all")&&e.attrNameTemplate||"",l=ue(e,"all")&&e.attrName||"",n=ue(e,"all")&&e.defaultValue||"",a=e=>le(t,l+e);return{[a("")]:{type:"string",default:n},[a("Tablet")]:{type:"string",default:""},[a("Mobile")]:{type:"string",default:""}}};K.defaultProps={attrNameTemplate:"",attrName:"",defaultValue:""};const G=K,W=e=>{const t=ue(e,"all")&&e.attrNameTemplate||"",l=ue(e,"all")&&e.disableWidthDirections||[],n=!ue(e,"all")||(e.allowBorderColor??!0),a=!ue(e,"all")||(e.allowBorderRadius??!0),o=e=>le(t,e),r=R({attrNameTemplate:t,attrName:"BorderWidth",disableDirections:l,allowUnitControl:!1}),i=n?{[o("BorderColor")]:{type:"string",default:""}}:{},s=a?R({attrNameTemplate:t,attrName:"BorderRadius"}):{};return{[o("BorderStyle")]:{type:"string",default:""},...i,...r,...s}};W.defaultProps={attrNameTemplate:"",allowBorderColor:!0,allowBorderRadius:!0};const H=W,$=e=>{const t=ue(e,"all")&&e.attrNameTemplate||"",l=e=>le(t,e);return{[l("BoxShadowColor")]:{type:"string",default:""},[l("BoxShadowHorizontal")]:{type:"number",default:""},[l("BoxShadowVertical")]:{type:"number",default:""},[l("BoxShadowBlur")]:{type:"number",default:""},[l("BoxShadowSpread")]:{type:"number",default:""},[l("BoxShadowPosition")]:{type:"string",default:""}}};$.defaultProps={attrNameTemplate:""};const Y=$,X=e=>{const t=ue(e,"all")&&e.excludePanels||[],l=ue(e,"all")&&e.includePanels||[];let n=l&&l.length?l:J();const a=e=>le("",e);t&&t.length&&t.forEach(e=>{n.splice(n.indexOf(e),1)});let o={};const r=D();if(n.includes("advanced")){const e=R({attrName:a("Margin")}),t=R({attrName:a("Padding")});o={...o,...e,...t,[a("zIndex")]:{type:"number",default:""},[a("cssId")]:{type:"string",default:""},[a("cssClasses")]:{type:"string",default:""}}}if(n.includes("motion-effects")&&(o={...o,[a("EntranceAnimation")]:{type:"string",default:""},[a("EntranceAnimationDuration")]:{type:"string",default:"normal"},[a("EntranceAnimationDelay")]:{type:"number",default:""}}),n.includes("background")){const e=j({attrNameTemplate:"Advanced"});o={...o,...e}}if(n.includes("border")){const e=H({attrNameTemplate:"Advanced"}),t=Y({attrNameTemplate:"Advanced"});o={...o,...e,...t}}if(n.includes("positioning")){const e=G({attrName:a("BlockWidth")}),t=L({blockAttributeKey:a("BlockCustomWidth"),allowScreens:!0}),l=L({blockAttributeKey:a("PositionHorizontalOffset"),allowScreens:!0}),n=L({blockAttributeKey:a("PositionVerticalOffset"),allowScreens:!0});o={...o,...e,...t,[a("BlockPosition")]:{type:"string",default:""},[a("PositionHorizontalOrientation")]:{type:"string",default:"left"},...l,[a("PositionVerticalOrientation")]:{type:"string",default:"top"},...n}}return n.includes("responsive")&&(o={...o,...r}),o};X.defaultProps={excludePanels:[],includePanels:[]};const Z=X,J=()=>["advanced","motion-effects","background","border","positioning","responsive"],Q=(e,t="")=>{const l=e=>le(t,e),n=[];return e[l("cssClasses")]&&n.push(e[l("cssClasses")]),void 0!==e[l("EntranceAnimation")]&&""!==e[l("EntranceAnimation")]&&(n.push("qodef-entrance-animation--on"),e[l("EntranceAnimationDuration")]&&n.push("qodef-animation-speed--"+e[l("EntranceAnimationDuration")])),e[l("BlockWidth")]&&n.push("qodef-width--"+e[l("BlockWidth")]),e[l("BlockWidthTablet")]&&n.push("qodef-width--tablet--"+e[l("BlockWidthTablet")]),e[l("BlockWidthMobile")]&&n.push("qodef-width--mobile--"+e[l("BlockWidthMobile")]),n.push((e=>{const t=[];return P.map(l=>{const n="qodef-hide-on--"+l.classSuffix,a=e[l.blockAttributeKey];t.includes(n)&&!a?t.filter(function(e){return e!==n}):!t.includes(n)&&a&&t.push(n)}),t.join(" ")})(e)),n.join(" ")},ee=(e,t="")=>{let l={};const n=((e,t="")=>{const l=(e,l="")=>le(t,e,l),n={};return void 0!==e[l("EntranceAnimation")]&&""!==e[l("EntranceAnimation")]&&(n["data-animation"]=e[l("EntranceAnimation")]),"custom"!==e[l("BlockWidth")]&&"custom"!==e[l("BlockWidthTablet")]&&"custom"!==e[l("BlockWidthMobile")]||["","Tablet","Mobile"].forEach(t=>{const a=e[l("BlockCustomWidth",t)],o=e[l("BlockCustomWidthDecimal",t)],r=e[l("BlockCustomWidthUnit",t)];ie(r)&&a?n["data-width"+(t?"-"+t.toLowerCase():"")]=parseInt(a,10)+r:se(r)&&o&&(n["data-width"+(t?"-"+t.toLowerCase():"")]=parseFloat(o)+r)}),n})(e,t);return n&&(l={...l,...n}),l},te=(e,t="",l=[])=>{const n=e=>le(t,e);if(!e)return"";let a=[];return ue(e[n("cssId")],"all")&&a.push(e[n("cssId")]),l&&(a=[...a,...l]),a.join(" ")},le=(t,l,n)=>(t=t||"",l=l||"",n=n||"",C()((0,e.sprintf)("%s%s%s",t,l,n))),ne=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",ae=e=>e&&q!==e?ne(e):"",oe=(e,t)=>{let l=e.desktop;return"mobile"===t&&(l={...l,...e.tablet}),{...l,...e[t]}},re=(e,t=!0)=>{let l="";return Object.entries(e).map(([e,n])=>{l+=`${e.replace(/([A-Z])/g,(e,t,l)=>(l>0?"-":"")+e.toLowerCase())}: ${n} ${t?"!important":""};`}),l},ie=e=>["px"].includes(e),se=e=>["em","rem","%","vw","vh"].includes(e),ce=(e,t="integer")=>{let l="";return 0===e||"0"===e?l=0:e&&(l=parseInt(e,10),"decimal"===t&&(l=parseFloat(e))),l},ue=(e,t="")=>{let l=void 0!==e&&""!==e;return"all"===t&&(l=void 0!==e&&e),l},pe=e=>{let t="";return 0===e||"0"===e?t=0:e&&(t=e),t},me=(t,l=!0,n=[])=>{let a=[],o=[];if(t){switch(l&&(a=[{value:"",label:(0,e.__)("Default","qi-blocks")}]),t){case"no_yes":o=[{value:"no",label:(0,e.__)("No","qi-blocks")},{value:"yes",label:(0,e.__)("Yes","qi-blocks")}];break;case"yes_no":o=[{value:"yes",label:(0,e.__)("Yes","qi-blocks")},{value:"no",label:(0,e.__)("No","qi-blocks")}];break;case"link_target":o=[{value:"_self",label:(0,e.__)("Same Window","qi-blocks")},{value:"_blank",label:(0,e.__)("New Window","qi-blocks")}];break;case"column_gap":o=[{value:"huge",label:(0,e.__)("Huge (35)","qi-blocks")},{value:"large",label:(0,e.__)("Large (25)","qi-blocks")},{value:"medium",label:(0,e.__)("Medium (20)","qi-blocks")},{value:"normal",label:(0,e.__)("Normal (15)","qi-blocks")},{value:"small",label:(0,e.__)("Small (10)","qi-blocks")},{value:"tiny",label:(0,e.__)("Tiny (5)","qi-blocks")},{value:"no",label:(0,e.__)("No (0)","qi-blocks")}];break;case"columns_responsive":o=[{value:"predefined",label:(0,e.__)("Predefined","qi-blocks")},{value:"custom",label:(0,e.__)("Custom","qi-blocks")}];break;case"masonry_image_sizes":o=[{value:"square",label:(0,e.__)("Square","qi-blocks")},{value:"landscape",label:(0,e.__)("Landscape","qi-blocks")},{value:"portrait",label:(0,e.__)("Portrait","qi-blocks")},{value:"huge-square",label:(0,e.__)("Huge","qi-blocks")}];break;case"image_sizes":o=[{value:"full",label:(0,e.__)("Original","qi-blocks")},{value:"thumbnail",label:(0,e.__)("Thumbnail","qi-blocks")},{value:"medium",label:(0,e.__)("Medium","qi-blocks")},{value:"large",label:(0,e.__)("Large","qi-blocks")}];break;case"title_tag":o=[{value:"h1",label:(0,e.__)("H1","qi-blocks")},{value:"h2",label:(0,e.__)("H2","qi-blocks")},{value:"h3",label:(0,e.__)("H3","qi-blocks")},{value:"h4",label:(0,e.__)("H4","qi-blocks")},{value:"h5",label:(0,e.__)("H5","qi-blocks")},{value:"h6",label:(0,e.__)("H6","qi-blocks")},{value:"p",label:(0,e.__)("Paragraph","qi-blocks")}];break;case"font_weight":o=[{value:"normal",label:(0,e.__)("Normal","qi-blocks")},{value:"bold",label:(0,e.__)("Bold","qi-blocks")},{value:"100",label:(0,e.__)("Thin (100)","qi-blocks")},{value:"200",label:(0,e.__)("Extra Light (200)","qi-blocks")},{value:"300",label:(0,e.__)("Light (300)","qi-blocks")},{value:"400",label:(0,e.__)("Normal (400)","qi-blocks")},{value:"500",label:(0,e.__)("Medium (500)","qi-blocks")},{value:"600",label:(0,e.__)("Semi Bold (600)","qi-blocks")},{value:"700",label:(0,e.__)("Bold (700)","qi-blocks")},{value:"800",label:(0,e.__)("Extra Bold (800)","qi-blocks")},{value:"900",label:(0,e.__)("Black (900)","qi-blocks")}];break;case"text_transform":o=[{value:"none",label:(0,e.__)("None","qi-blocks")},{value:"uppercase",label:(0,e.__)("Uppercase","qi-blocks")},{value:"lowercase",label:(0,e.__)("Lowercase","qi-blocks")},{value:"capitalize",label:(0,e.__)("Capitalize","qi-blocks")},{value:"normal",label:(0,e.__)("Normal","qi-blocks")}];break;case"font_style":o=[{value:"normal",label:(0,e.__)("Normal","qi-blocks")},{value:"italic",label:(0,e.__)("Italic","qi-blocks")},{value:"oblique",label:(0,e.__)("Oblique","qi-blocks")}];break;case"text_decoration":o=[{value:"none",label:(0,e.__)("None","qi-blocks")},{value:"underline",label:(0,e.__)("Underline","qi-blocks")},{value:"overline",label:(0,e.__)("Overline","qi-blocks")},{value:"line-through",label:(0,e.__)("Line-Through","qi-blocks")}];break;case"background_position":o=[{value:"center center",label:(0,e.__)("Center Center","qi-blocks")},{value:"center left",label:(0,e.__)("Center Left","qi-blocks")},{value:"center right",label:(0,e.__)("Center Right","qi-blocks")},{value:"top center",label:(0,e.__)("Top Center","qi-blocks")},{value:"top left",label:(0,e.__)("Top Left","qi-blocks")},{value:"top right",label:(0,e.__)("Top Right","qi-blocks")},{value:"bottom center",label:(0,e.__)("Bottom Center","qi-blocks")},{value:"bottom left",label:(0,e.__)("Bottom Left","qi-blocks")},{value:"bottom right",label:(0,e.__)("Bottom Right","qi-blocks")}];break;case"background_attachment":o=[{value:"scroll",label:(0,e.__)("Scroll","qi-blocks")},{value:"fixed",label:(0,e.__)("Fixed","qi-blocks")}];break;case"background_repeat":o=[{value:"no-repeat",label:(0,e.__)("No-repeat","qi-blocks")},{value:"repeat",label:(0,e.__)("Repeat","qi-blocks")},{value:"repeat-x",label:(0,e.__)("Repeat-x","qi-blocks")},{value:"repeat-y",label:(0,e.__)("Repeat-y","qi-blocks")}];break;case"background_size":o=[{value:"auto",label:(0,e.__)("Auto","qi-blocks")},{value:"cover",label:(0,e.__)("Cover","qi-blocks")},{value:"contain",label:(0,e.__)("Contain","qi-blocks")}];break;case"horizontal_alignment":o=[{value:"left",label:(0,e.__)("Left","qi-blocks")},{value:"right",label:(0,e.__)("Right","qi-blocks")},{value:"center",label:(0,e.__)("Center","qi-blocks")}];break;case"vertical_alignment":o=[{value:"top",label:(0,e.__)("Top","qi-blocks")},{value:"middle",label:(0,e.__)("Middle","qi-blocks")},{value:"bottom",label:(0,e.__)("Bottom","qi-blocks")}];break;case"html_tag":o=[{value:"section",label:(0,e.__)("Section","qi-blocks")},{value:"div",label:(0,e.__)("Div","qi-blocks")},{value:"main",label:(0,e.__)("Main","qi-blocks")},{value:"article",label:(0,e.__)("Article","qi-blocks")},{value:"nav",label:(0,e.__)("Nav","qi-blocks")},{value:"footer",label:(0,e.__)("Footer","qi-blocks")},{value:"header",label:(0,e.__)("Header","qi-blocks")},{value:"aside",label:(0,e.__)("Aside","qi-blocks")}];break;case"appear_animation":o=[{value:"none",label:(0,e.__)("None","qi-blocks")},{value:"from-bottom",label:(0,e.__)("From Bottom","qi-blocks")},{value:"from-top",label:(0,e.__)("From Top","qi-blocks")},{value:"from-left",label:(0,e.__)("From Left","qi-blocks")},{value:"from-right",label:(0,e.__)("From Right","qi-blocks")},{value:"fade",label:(0,e.__)("Fade in","qi-blocks")}];break;case"appear_delay":o=[{value:"random",label:(0,e.__)("Random","qi-blocks")},{value:"ms",label:(0,e.__)("Set ms","qi-blocks")}];break;case"responsive_screens":o=[{value:"1024",label:(0,e.__)("Below 1024px","qi-blocks")},{value:"768",label:(0,e.__)("Below 768px","qi-blocks")},{value:"680",label:(0,e.__)("Below 680px","qi-blocks")},{value:"480",label:(0,e.__)("Below 480px","qi-blocks")}];break;case"order_by":o=[{value:"date",label:(0,e.__)("Date","qi-blocks")},{value:"id",label:(0,e.__)("ID","qi-blocks")},{value:"title",label:(0,e.__)("Title","qi-blocks")}];break;case"order":o=[{value:"desc",label:(0,e.__)("Descending","qi-blocks")},{value:"asc",label:(0,e.__)("Ascending","qi-blocks")}];break;case"border_style":o=[{value:"solid",label:(0,e.__)("Solid","qi-blocks")},{value:"dashed",label:(0,e.__)("Dashed","qi-blocks")},{value:"dotted",label:(0,e.__)("Dotted","qi-blocks")}]}a=[...a,...o],n&&(a=[...a,...n])}return(0,m.applyFilters)("qi-blocks-filter-options-pool",a)};class be extends i.Component{constructor(){super(...arguments),this.state={screen:q,isScreenPickerOpen:!1,isMouseOver:!1}}onChangeScreen(e,t){const l=this;l.state.isScreenPickerOpen?(l.props.onChangeScreen(e),l.setState({screen:e,isScreenPickerOpen:!1}),x=e,!t&&l.changePreviewScreen(e),(0,m.doAction)("qi-blocks-action-screen-change",e)):t||l.setState({isScreenPickerOpen:!0}),window.addEventListener("click",e=>{const t=document.querySelectorAll(".qodef-screens-option .qodef-screens.qodef--opened");t.length&&!t[0].contains(e.target)&&l.setState({isScreenPickerOpen:!1})})}onOtherScreenChange(e){this.props.onChangeScreen(e),this.setState({screen:e})}componentDidMount(){const{instanceId:e}=this.props;(0,m.addAction)("qi-blocks-action-screen-change",`qi-blocks/components/screen-control-${e}`,this.onOtherScreenChange.bind(this))}componentWillUnmount(){const{instanceId:e}=this.props;(0,m.removeAction)("qi-blocks-action-screen-change",`qi-blocks/components/screen-control-${e}`)}changeScreenControls(e){I()!==e.previewScreen&&this.onChangeScreen(e.previewScreen,!0)}changePreviewScreen(e){if(e!==this.props.previewScreen){const t=(0,p.dispatch)("core/edit-post")||"",l=(0,p.dispatch)("core/edit-site")||"";let n;if(t){let{__experimentalSetPreviewDeviceType:e}=t;n=e}if(l){const{__experimentalSetPreviewDeviceType:e}=l;n=e}n&&n(ne(e))}}render(){const e={...this.props},t={...this.state},{label:l,screens:n,isWidgetsArea:a,previewScreen:o}=e;let r=!1;return(n.length<1||a)&&(r=!0),q!==o&&t.screen!==o&&this.onOtherScreenChange(o),this.changeScreenControls(e),wp.element.createElement("div",{className:"qodef-screens-option"},q!==t.screen&&wp.element.createElement("style",null,"\n\t\t\t\t\t\t\t.qodef-screens-option .qodef-screens.qodef--opened {\n\t\t\t\t\t\t\t\ttop: calc(-4px - 22px * "+Object.keys(n).indexOf(t.screen)+");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t"),l&&wp.element.createElement("label",{className:"qodef-option-label"},l),!r&&wp.element.createElement("ul",{className:"qodef-screens "+(t.isScreenPickerOpen?"qodef--opened":"")},Object.entries(n).map(([e,l],a)=>a===Object.keys(n).indexOf(t.screen)||t.isScreenPickerOpen?wp.element.createElement("li",{className:"qodef-screen-item "+(e===t.screen?"qodef--selected":""),key:a},wp.element.createElement(c.Button,{className:"qodef-screen-item-button",onClick:()=>this.onChangeScreen(e),icon:l.icon,showTooltip:!1,label:l.label,"data-screen":e,onMouseEnter:()=>this.setState({isMouseOver:e}),onMouseLeave:()=>this.setState({isMouseOver:!1})}),e===t.isMouseOver&&wp.element.createElement("div",{className:"qodef-screen-item-tooltip"},l.label)):null)))}}be.defaultProps={label:"",screens:E,isWidgetsArea:!1,previewScreen:"desktop",onChangeScreen:()=>{}};const de=(0,p.withSelect)(e=>{let t="desktop";return e("core/edit-post")&&(t="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-post").__experimentalGetPreviewDeviceType().toLowerCase()),e("core/edit-site")&&(t="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-site").__experimentalGetPreviewDeviceType().toLowerCase()),{isWidgetsArea:e("core/edit-widgets")&&!e("core/edit-post"),previewScreen:t}})((0,u.withInstanceId)(be));class fe extends i.Component{constructor(){super(...arguments),this.state={screen:I()}}getScreenLabelSuffix(){return ae(this.state.screen)}getAttributeValue(e,t=this.getScreenLabelSuffix()){const{blockAttributes:l,repeater:n,repeaterItemIndex:a,repeaterItemKey:o,repeaterGetAttributes:r}=this.props;let i=e;t&&(i=e+t);let s=l[i];return n&&(s=r({key:o,childKey:i},a)),pe(s)}setAttributeValue(e,t,l=this.getScreenLabelSuffix()){const{setAttributes:n,setCustomEventOnChange:a,repeater:o,repeaterItemIndex:r,repeaterItemKey:i,repeaterSetAttributes:s}=this.props;let c=e;l&&(c=e+l),o?s({key:i,childKey:c},t,r):n({[c]:t}),a(t)}render(){const e={...this.props},{label:t,blockAttributeKey:l,selectOptions:n}=e;return e.onChangeScreen=e=>{this.setState({screen:e})},wp.element.createElement(c.BaseControl,{className:"qodef-advanced-select-option"},wp.element.createElement("div",{className:"qodef-advanced-select-heading"},wp.element.createElement(de,{label:t,onChangeScreen:e.onChangeScreen})),wp.element.createElement(c.SelectControl,{value:this.getAttributeValue(l),options:n,onChange:e=>this.setAttributeValue(l,e)}))}}fe.defaultProps={label:(0,e.__)("Default Label Text","qi-blocks"),blockAttributes:{},blockAttributeKey:"",setAttributes:()=>{},selectOptions:{},setCustomEventOnChange:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const ge=fe,he=e=>{const{unitType:t,unitValue:l,onChangeUnit:n}=e;if(e.units[t])return wp.element.createElement("ul",{className:"qodef-unit-control"},Object.entries(e.units[t]).map(([e,t],a)=>wp.element.createElement("li",{key:a},wp.element.createElement("a",{className:d()("qodef-unit",{"qodef--selected":("p"===e?"%":e)===l}),onClick:n,"data-unit":"p"===e?"%":e},t))))};he.defaultProps={units:{typography:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks"),rem:(0,e.__)("rem","qi-blocks"),vw:(0,e.__)("vw","qi-blocks")},measure:{px:(0,e.__)("px","qi-blocks"),p:(0,e.__)("%","qi-blocks"),vw:(0,e.__)("vw","qi-blocks"),vh:(0,e.__)("vh","qi-blocks")},space:{px:(0,e.__)("px","qi-blocks"),p:(0,e.__)("%","qi-blocks"),em:(0,e.__)("em","qi-blocks")},height:{px:(0,e.__)("px","qi-blocks"),vw:(0,e.__)("vw","qi-blocks"),vh:(0,e.__)("vh","qi-blocks")},xPosition:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks"),p:(0,e.__)("%","qi-blocks"),vw:(0,e.__)("vw","qi-blocks")},yPosition:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks"),p:(0,e.__)("%","qi-blocks"),vh:(0,e.__)("vh","qi-blocks")},pxAndPercent:{px:(0,e.__)("px","qi-blocks"),p:(0,e.__)("%","qi-blocks")},pxAndEm:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks")},pxEmVw:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks"),vw:(0,e.__)("vw","qi-blocks")},pxPercentVh:{px:(0,e.__)("px","qi-blocks"),p:(0,e.__)("%","qi-blocks"),vh:(0,e.__)("vh","qi-blocks")},pxPercentVw:{px:(0,e.__)("px","qi-blocks"),p:(0,e.__)("%","qi-blocks"),vw:(0,e.__)("vw","qi-blocks")},pxEmRem:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks"),rem:(0,e.__)("rem","qi-blocks")}},unitValue:"",onChangeUnit:()=>{}};const ke=he,_e=qiBlocksEditor.vars.defaultFontSize,ve=qiBlocksEditor.vars.defaultLineHeight,we=e=>{const{convertorType:t,value:l,attributeKey:n}=e;let a=1;n.includes("FontSize")||n.includes("fontSize")?a=_e:(n.includes("LineHeight")||n.includes("lineHeight"))&&(a=ve);const o=e=>Math.round(parseInt(e,10)/a*100)/100,r=e=>Math.round(parseInt(e,10)/a*100)/100,i=e=>Math.round(parseFloat(e)/a*100),s=e=>Math.round(100*parseInt(e,10)/window.innerWidth),c=e=>Math.round(100*parseInt(e,10)/window.innerHeight),u=e=>Math.round(parseFloat(e)*a),p=e=>Math.round(parseFloat(e)*a/100),m=e=>Math.round(window.innerWidth*parseInt(e,10)/100),b=e=>Math.round(window.innerHeight*parseInt(e,10)/100);let d="";if(""!==l&&""!==n&&""!==t)switch(t){case"pxToEm":d=o(l);break;case"pxToRem":d=r(l);break;case"pxToP":d=i(l);break;case"pxToVw":d=s(l);break;case"pxToVh":d=c(l);break;case"emToPx":d=u(l);break;case"emToRem":case"remToRem":case"vwToVh":case"vhToVw":d=l;break;case"emToP":case"remToP":d=(e=>100*parseFloat(e))(l);break;case"emToVw":case"remToVw":d=(e=>s(u(e)))(l);break;case"emToVh":case"remToVh":d=(e=>c(u(e)))(l);break;case"remToPx":d=(e=>Math.round(parseFloat(e)*a))(l);break;case"pToPx":d=p(l);break;case"pToEm":case"pToRem":d=(e=>parseFloat(e)/100)(l);break;case"pToVw":d=(e=>s(p(e)))(l);break;case"pToVh":d=(e=>c(p(e)))(l);break;case"vwToPx":d=m(l);break;case"vwToEm":d=(e=>o(m(e)))(l);break;case"vwToRem":d=(e=>r(m(e)))(l);break;case"vwToP":d=(e=>i(m(e)))(l);break;case"vhToPx":d=b(l);break;case"vhToEm":d=(e=>o(b(e)))(l);break;case"vhToRem":d=(e=>r(b(e)))(l);break;case"vhToP":d=(e=>i(b(e)))(l)}return d};we.defaultProps={convertorType:"pxToEm"};const ye=we;class Ae extends i.Component{constructor(){super(...arguments),this.state={screen:I()}}getScreenLabelSuffix(e){const t=e||this.state.screen;return ae(t)}getAttributeValue(e,t=""){const{blockAttributes:l,allowScreens:n,repeater:a,repeaterItemIndex:o,repeaterItemKey:r,repeaterGetAttributes:i}=this.props;let s=e;n&&t&&(s=e+t);let c=l[s];return a&&(c=i({key:r,childKey:s},o)),pe(c)}setAttributeValue(e,t,l=this.getScreenLabelSuffix()){const{setAttributes:n,allowScreens:a,repeater:o,repeaterItemIndex:r,repeaterItemKey:i,repeaterSetAttributes:s}=this.props;let c=e;a&&l&&(c=e+l),o?s({key:i,childKey:c},t,r):n({[c]:t})}onChangeUnitsValues(e,t,l,n){const a={...this.props},{rangeMax:o,rangeDecimalMax:r,allowUnitsConvertor:i}=a;let s=this.getAttributeValue(t);const c=s;n?(s=parseInt(s,10),s>o&&(s=o)):!n&&s>r&&(s=r),i?["emToRem","remToEm","vwToVh","vhToVw"].includes(l)||(this.setAttributeValue(e,ye({convertorType:l,value:c,attributeKey:t}),""),this.setAttributeValue(t,"","")):(this.setAttributeValue(e,s,""),this.setAttributeValue(t,"",""))}render(){const e={...this.props},{label:t,unitType:l,blockAttributeKey:n,rangeMax:a,rangeMin:o,rangeStep:r,rangeDecimalMax:i,rangeDecimalMin:s,rangeDecimalStep:u,optionType:p,allowReset:m,allowScreens:b,allowUnits:d,repeater:f,repeaterItemKey:g,isSimpleRepeaterValue:h}=e,k=this.getScreenLabelSuffix();let _=f&&!h?g:n;const v=`${_}Decimal`,w=`${_}Unit`,y=`${_}Tablet`,A=`${v}Tablet`,S=`${w}Tablet`,q=`${_}Mobile`,E=`${v}Mobile`,x=`${w}Mobile`;return e.onChangeScreen=e=>{this.setState({screen:e})},e.onChangeUnit=e=>{e.preventDefault();const t=f?200:0,l=e.target.getAttribute("data-unit"),n=this.getAttributeValue(w,k)||"px";this.setAttributeValue(w,l),setTimeout(()=>{if(l!==n){const e=`${n}To${ne(l)}`;let t=_+k,a=v+k;"px"!==l&&(t=v+k,a=_+k),this.onChangeUnitsValues(t,a,e,"px"===l)}},t)},e.onChange=t=>{this.setAttributeValue(_,t),e.setCustomEventOnChange()},e.onChangeDecimal=t=>{let l=0;"decimal"===p&&void 0===t&&(l=200),setTimeout(()=>{this.setAttributeValue(v,t),e.setCustomEventOnChange()},l)},e.getPlaceholderValue=e=>{let t="";const l=this.getAttributeValue(_),n=this.getAttributeValue(v),a=this.getAttributeValue(y),o=this.getAttributeValue(A);return"Tablet"===k?e&&""===a?t=l:e||""!==o||(t=n):"Mobile"===k&&(e&&""===this.getAttributeValue(q)?t=""!==a?a:l:e||""!==this.getAttributeValue(E)||(t=""!==o?o:n)),t},wp.element.createElement(c.BaseControl,{className:"qodef-advanced-range-option"},wp.element.createElement("div",{className:"qodef-advanced-range-heading"},b?wp.element.createElement(de,{label:t,onChangeScreen:e.onChangeScreen}):wp.element.createElement("label",{className:"qodef-option-label"},t),d&&wp.element.createElement(ke,{unitType:l,unitValue:this.getAttributeValue(w,k),onChangeUnit:e.onChangeUnit})),"desktop"===this.state.screen&&wp.element.createElement(wp.element.Fragment,null,(ie(this.getAttributeValue(w))&&"decimal"!==p||!d&&"integer"===p)&&wp.element.createElement(c.RangeControl,{min:o,max:a,step:r,value:this.getAttributeValue(_),onChange:e.onChange,allowReset:m}),(se(this.getAttributeValue(w))||!d&&"decimal"===p)&&wp.element.createElement(c.RangeControl,{min:s,max:i,step:u,value:this.getAttributeValue(v),onChange:e.onChangeDecimal,allowReset:m})),"tablet"===this.state.screen&&wp.element.createElement(wp.element.Fragment,null,(ie(this.getAttributeValue(S))&&"decimal"!==p||!d&&"integer"===p)&&wp.element.createElement(c.RangeControl,{min:o,max:a,step:r,value:this.getAttributeValue(y),afterIcon:e.getPlaceholderValue(!0),onChange:e.onChange,allowReset:m}),(se(this.getAttributeValue(S))||!d&&"decimal"===p)&&wp.element.createElement(c.RangeControl,{min:s,max:i,step:u,value:this.getAttributeValue(A),afterIcon:e.getPlaceholderValue(!1),onChange:e.onChangeDecimal,allowReset:m})),"mobile"===this.state.screen&&wp.element.createElement(wp.element.Fragment,null,(ie(this.getAttributeValue(x))&&"decimal"!==p||!d&&"integer"===p)&&wp.element.createElement(c.RangeControl,{min:o,max:a,step:r,value:this.getAttributeValue(q),afterIcon:e.getPlaceholderValue(!0),onChange:e.onChange,allowReset:m}),(se(this.getAttributeValue(x))||!d&&"decimal"===p)&&wp.element.createElement(c.RangeControl,{min:s,max:i,step:u,value:this.getAttributeValue(E),afterIcon:e.getPlaceholderValue(!1),onChange:e.onChangeDecimal,allowReset:m})))}}Ae.defaultProps={label:(0,e.__)("Default Label Text","qi-blocks"),unitType:"typography",blockAttributes:{},blockAttributeKey:"",setAttributes:()=>{},rangeMax:300,rangeMin:0,rangeStep:1,rangeDecimalMax:10,rangeDecimalMin:0,rangeDecimalStep:.01,optionType:"integer",allowReset:!0,screens:E,allowScreens:!1,allowUnits:!0,allowUnitsConvertor:!1,setCustomEventOnChange:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",isSimpleRepeaterValue:!1,repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Se=Ae,qe=wp.blob,{entries:Ee,setPrototypeOf:xe,isFrozen:Ie,getPrototypeOf:Te,getOwnPropertyDescriptor:Ce}=Object;let{freeze:Be,seal:Ne,create:Pe}=Object,{apply:Oe,construct:De}="undefined"!=typeof Reflect&&Reflect;Be||(Be=function(e){return e}),Ne||(Ne=function(e){return e}),Oe||(Oe=function(e,t,l){return e.apply(t,l)}),De||(De=function(e,t){return new e(...t)});const Ve=Ze(Array.prototype.forEach),Re=Ze(Array.prototype.lastIndexOf),Me=Ze(Array.prototype.pop),Le=Ze(Array.prototype.push),ze=Ze(Array.prototype.splice),Ue=Ze(String.prototype.toLowerCase),Fe=Ze(String.prototype.toString),je=Ze(String.prototype.match),Ke=Ze(String.prototype.replace),Ge=Ze(String.prototype.indexOf),We=Ze(String.prototype.trim),He=Ze(Object.prototype.hasOwnProperty),$e=Ze(RegExp.prototype.test),Ye=(Xe=TypeError,function(){for(var e=arguments.length,t=new Array(e),l=0;l<e;l++)t[l]=arguments[l];return De(Xe,t)});var Xe;function Ze(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var l=arguments.length,n=new Array(l>1?l-1:0),a=1;a<l;a++)n[a-1]=arguments[a];return Oe(e,t,n)}}function Je(e,t){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ue;xe&&xe(e,null);let n=t.length;for(;n--;){let a=t[n];if("string"==typeof a){const e=l(a);e!==a&&(Ie(t)||(t[n]=e),a=e)}e[a]=!0}return e}function Qe(e){for(let t=0;t<e.length;t++){He(e,t)||(e[t]=null)}return e}function et(e){const t=Pe(null);for(const[l,n]of Ee(e)){He(e,l)&&(Array.isArray(n)?t[l]=Qe(n):n&&"object"==typeof n&&n.constructor===Object?t[l]=et(n):t[l]=n)}return t}function tt(e,t){for(;null!==e;){const l=Ce(e,t);if(l){if(l.get)return Ze(l.get);if("function"==typeof l.value)return Ze(l.value)}e=Te(e)}return function(){return null}}const lt=Be(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),nt=Be(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),at=Be(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ot=Be(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),rt=Be(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),it=Be(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),st=Be(["#text"]),ct=Be(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),ut=Be(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),pt=Be(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),mt=Be(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),bt=Ne(/\{\{[\w\W]*|[\w\W]*\}\}/gm),dt=Ne(/<%[\w\W]*|[\w\W]*%>/gm),ft=Ne(/\$\{[\w\W]*/gm),gt=Ne(/^data-[\-\w.\u00B7-\uFFFF]+$/),ht=Ne(/^aria-[\-\w]+$/),kt=Ne(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),_t=Ne(/^(?:\w+script|data):/i),vt=Ne(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),wt=Ne(/^html$/i),yt=Ne(/^[a-z][.\w]*(-[.\w]+)+$/i);var At=Object.freeze({__proto__:null,ARIA_ATTR:ht,ATTR_WHITESPACE:vt,CUSTOM_ELEMENT:yt,DATA_ATTR:gt,DOCTYPE_NAME:wt,ERB_EXPR:dt,IS_ALLOWED_URI:kt,IS_SCRIPT_OR_DATA:_t,MUSTACHE_EXPR:bt,TMPLIT_EXPR:ft});const St=1,qt=3,Et=7,xt=8,It=9,Tt=function(){return"undefined"==typeof window?null:window};var Ct=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Tt();const l=t=>e(t);if(l.version="3.2.6",l.removed=[],!t||!t.document||t.document.nodeType!==It||!t.Element)return l.isSupported=!1,l;let{document:n}=t;const a=n,o=a.currentScript,{DocumentFragment:r,HTMLTemplateElement:i,Node:s,Element:c,NodeFilter:u,NamedNodeMap:p=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:m,DOMParser:b,trustedTypes:d}=t,f=c.prototype,g=tt(f,"cloneNode"),h=tt(f,"remove"),k=tt(f,"nextSibling"),_=tt(f,"childNodes"),v=tt(f,"parentNode");if("function"==typeof i){const e=n.createElement("template");e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let w,y="";const{implementation:A,createNodeIterator:S,createDocumentFragment:q,getElementsByTagName:E}=n,{importNode:x}=a;let I={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};l.isSupported="function"==typeof Ee&&"function"==typeof v&&A&&void 0!==A.createHTMLDocument;const{MUSTACHE_EXPR:T,ERB_EXPR:C,TMPLIT_EXPR:B,DATA_ATTR:N,ARIA_ATTR:P,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:D,CUSTOM_ELEMENT:V}=At;let{IS_ALLOWED_URI:R}=At,M=null;const L=Je({},[...lt,...nt,...at,...rt,...st]);let z=null;const U=Je({},[...ct,...ut,...pt,...mt]);let F=Object.seal(Pe(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),j=null,K=null,G=!0,W=!0,H=!1,$=!0,Y=!1,X=!0,Z=!1,J=!1,Q=!1,ee=!1,te=!1,le=!1,ne=!0,ae=!1,oe=!0,re=!1,ie={},se=null;const ce=Je({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ue=null;const pe=Je({},["audio","video","img","source","image","track"]);let me=null;const be=Je({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),de="http://www.w3.org/1998/Math/MathML",fe="http://www.w3.org/2000/svg",ge="http://www.w3.org/1999/xhtml";let he=ge,ke=!1,_e=null;const ve=Je({},[de,fe,ge],Fe);let we=Je({},["mi","mo","mn","ms","mtext"]),ye=Je({},["annotation-xml"]);const Ae=Je({},["title","style","font","a","script"]);let Se=null;const qe=["application/xhtml+xml","text/html"];let xe=null,Ie=null;const Te=n.createElement("form"),Ce=function(e){return e instanceof RegExp||e instanceof Function},Ne=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ie||Ie!==e){if(e&&"object"==typeof e||(e={}),e=et(e),Se=-1===qe.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,xe="application/xhtml+xml"===Se?Fe:Ue,M=He(e,"ALLOWED_TAGS")?Je({},e.ALLOWED_TAGS,xe):L,z=He(e,"ALLOWED_ATTR")?Je({},e.ALLOWED_ATTR,xe):U,_e=He(e,"ALLOWED_NAMESPACES")?Je({},e.ALLOWED_NAMESPACES,Fe):ve,me=He(e,"ADD_URI_SAFE_ATTR")?Je(et(be),e.ADD_URI_SAFE_ATTR,xe):be,ue=He(e,"ADD_DATA_URI_TAGS")?Je(et(pe),e.ADD_DATA_URI_TAGS,xe):pe,se=He(e,"FORBID_CONTENTS")?Je({},e.FORBID_CONTENTS,xe):ce,j=He(e,"FORBID_TAGS")?Je({},e.FORBID_TAGS,xe):et({}),K=He(e,"FORBID_ATTR")?Je({},e.FORBID_ATTR,xe):et({}),ie=!!He(e,"USE_PROFILES")&&e.USE_PROFILES,G=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,H=e.ALLOW_UNKNOWN_PROTOCOLS||!1,$=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,X=!1!==e.SAFE_FOR_XML,Z=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,le=e.RETURN_TRUSTED_TYPE||!1,Q=e.FORCE_BODY||!1,ne=!1!==e.SANITIZE_DOM,ae=e.SANITIZE_NAMED_PROPS||!1,oe=!1!==e.KEEP_CONTENT,re=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||kt,he=e.NAMESPACE||ge,we=e.MATHML_TEXT_INTEGRATION_POINTS||we,ye=e.HTML_INTEGRATION_POINTS||ye,F=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ce(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(F.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ce(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(F.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(F.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),ie&&(M=Je({},st),z=[],!0===ie.html&&(Je(M,lt),Je(z,ct)),!0===ie.svg&&(Je(M,nt),Je(z,ut),Je(z,mt)),!0===ie.svgFilters&&(Je(M,at),Je(z,ut),Je(z,mt)),!0===ie.mathMl&&(Je(M,rt),Je(z,pt),Je(z,mt))),e.ADD_TAGS&&(M===L&&(M=et(M)),Je(M,e.ADD_TAGS,xe)),e.ADD_ATTR&&(z===U&&(z=et(z)),Je(z,e.ADD_ATTR,xe)),e.ADD_URI_SAFE_ATTR&&Je(me,e.ADD_URI_SAFE_ATTR,xe),e.FORBID_CONTENTS&&(se===ce&&(se=et(se)),Je(se,e.FORBID_CONTENTS,xe)),oe&&(M["#text"]=!0),Z&&Je(M,["html","head","body"]),M.table&&(Je(M,["tbody"]),delete j.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Ye('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Ye('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=e.TRUSTED_TYPES_POLICY,y=w.createHTML("")}else void 0===w&&(w=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let l=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(l=t.getAttribute(n));const a="dompurify"+(l?"#"+l:"");try{return e.createPolicy(a,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+a+" could not be created."),null}}(d,o)),null!==w&&"string"==typeof y&&(y=w.createHTML(""));Be&&Be(e),Ie=e}},Oe=Je({},[...nt,...at,...ot]),De=Je({},[...rt,...it]),Xe=function(e){Le(l.removed,{element:e});try{v(e).removeChild(e)}catch(t){h(e)}},Ze=function(e,t){try{Le(l.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Le(l.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{Xe(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Qe=function(e){let t=null,l=null;if(Q)e="<remove></remove>"+e;else{const t=je(e,/^[\r\n\t ]+/);l=t&&t[0]}"application/xhtml+xml"===Se&&he===ge&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const a=w?w.createHTML(e):e;if(he===ge)try{t=(new b).parseFromString(a,Se)}catch(e){}if(!t||!t.documentElement){t=A.createDocument(he,"template",null);try{t.documentElement.innerHTML=ke?y:a}catch(e){}}const o=t.body||t.documentElement;return e&&l&&o.insertBefore(n.createTextNode(l),o.childNodes[0]||null),he===ge?E.call(t,Z?"html":"body")[0]:Z?t.documentElement:o},bt=function(e){return S.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},dt=function(e){return e instanceof m&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof p)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},ft=function(e){return"function"==typeof s&&e instanceof s};function gt(e,t,n){Ve(e,e=>{e.call(l,t,n,Ie)})}const ht=function(e){let t=null;if(gt(I.beforeSanitizeElements,e,null),dt(e))return Xe(e),!0;const n=xe(e.nodeName);if(gt(I.uponSanitizeElement,e,{tagName:n,allowedTags:M}),X&&e.hasChildNodes()&&!ft(e.firstElementChild)&&$e(/<[/\w!]/g,e.innerHTML)&&$e(/<[/\w!]/g,e.textContent))return Xe(e),!0;if(e.nodeType===Et)return Xe(e),!0;if(X&&e.nodeType===xt&&$e(/<[/\w]/g,e.data))return Xe(e),!0;if(!M[n]||j[n]){if(!j[n]&&vt(n)){if(F.tagNameCheck instanceof RegExp&&$e(F.tagNameCheck,n))return!1;if(F.tagNameCheck instanceof Function&&F.tagNameCheck(n))return!1}if(oe&&!se[n]){const t=v(e)||e.parentNode,l=_(e)||e.childNodes;if(l&&t){for(let n=l.length-1;n>=0;--n){const a=g(l[n],!0);a.__removalCount=(e.__removalCount||0)+1,t.insertBefore(a,k(e))}}}return Xe(e),!0}return e instanceof c&&!function(e){let t=v(e);t&&t.tagName||(t={namespaceURI:he,tagName:"template"});const l=Ue(e.tagName),n=Ue(t.tagName);return!!_e[e.namespaceURI]&&(e.namespaceURI===fe?t.namespaceURI===ge?"svg"===l:t.namespaceURI===de?"svg"===l&&("annotation-xml"===n||we[n]):Boolean(Oe[l]):e.namespaceURI===de?t.namespaceURI===ge?"math"===l:t.namespaceURI===fe?"math"===l&&ye[n]:Boolean(De[l]):e.namespaceURI===ge?!(t.namespaceURI===fe&&!ye[n])&&!(t.namespaceURI===de&&!we[n])&&!De[l]&&(Ae[l]||!Oe[l]):!("application/xhtml+xml"!==Se||!_e[e.namespaceURI]))}(e)?(Xe(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!$e(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===qt&&(t=e.textContent,Ve([T,C,B],e=>{t=Ke(t,e," ")}),e.textContent!==t&&(Le(l.removed,{element:e.cloneNode()}),e.textContent=t)),gt(I.afterSanitizeElements,e,null),!1):(Xe(e),!0)},_t=function(e,t,l){if(ne&&("id"===t||"name"===t)&&(l in n||l in Te))return!1;if(W&&!K[t]&&$e(N,t));else if(G&&$e(P,t));else if(!z[t]||K[t]){if(!(vt(e)&&(F.tagNameCheck instanceof RegExp&&$e(F.tagNameCheck,e)||F.tagNameCheck instanceof Function&&F.tagNameCheck(e))&&(F.attributeNameCheck instanceof RegExp&&$e(F.attributeNameCheck,t)||F.attributeNameCheck instanceof Function&&F.attributeNameCheck(t))||"is"===t&&F.allowCustomizedBuiltInElements&&(F.tagNameCheck instanceof RegExp&&$e(F.tagNameCheck,l)||F.tagNameCheck instanceof Function&&F.tagNameCheck(l))))return!1}else if(me[t]);else if($e(R,Ke(l,D,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Ge(l,"data:")||!ue[e]){if(H&&!$e(O,Ke(l,D,"")));else if(l)return!1}else;return!0},vt=function(e){return"annotation-xml"!==e&&je(e,V)},yt=function(e){gt(I.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||dt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z,forceKeepAttr:void 0};let a=t.length;for(;a--;){const o=t[a],{name:r,namespaceURI:i,value:s}=o,c=xe(r),u=s;let p="value"===r?u:We(u);if(n.attrName=c,n.attrValue=p,n.keepAttr=!0,n.forceKeepAttr=void 0,gt(I.uponSanitizeAttribute,e,n),p=n.attrValue,!ae||"id"!==c&&"name"!==c||(Ze(r,e),p="user-content-"+p),X&&$e(/((--!?|])>)|<\/(style|title)/i,p)){Ze(r,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){Ze(r,e);continue}if(!$&&$e(/\/>/i,p)){Ze(r,e);continue}Y&&Ve([T,C,B],e=>{p=Ke(p,e," ")});const m=xe(e.nodeName);if(_t(m,c,p)){if(w&&"object"==typeof d&&"function"==typeof d.getAttributeType)if(i);else switch(d.getAttributeType(m,c)){case"TrustedHTML":p=w.createHTML(p);break;case"TrustedScriptURL":p=w.createScriptURL(p)}if(p!==u)try{i?e.setAttributeNS(i,r,p):e.setAttribute(r,p),dt(e)?Xe(e):Me(l.removed)}catch(t){Ze(r,e)}}else Ze(r,e)}gt(I.afterSanitizeAttributes,e,null)},Ct=function e(t){let l=null;const n=bt(t);for(gt(I.beforeSanitizeShadowDOM,t,null);l=n.nextNode();)gt(I.uponSanitizeShadowNode,l,null),ht(l),yt(l),l.content instanceof r&&e(l.content);gt(I.afterSanitizeShadowDOM,t,null)};return l.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,i=null,c=null;if(ke=!e,ke&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ft(e)){if("function"!=typeof e.toString)throw Ye("toString is not a function");if("string"!=typeof(e=e.toString()))throw Ye("dirty is not a string, aborting")}if(!l.isSupported)return e;if(J||Ne(t),l.removed=[],"string"==typeof e&&(re=!1),re){if(e.nodeName){const t=xe(e.nodeName);if(!M[t]||j[t])throw Ye("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof s)n=Qe("\x3c!----\x3e"),o=n.ownerDocument.importNode(e,!0),o.nodeType===St&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!ee&&!Y&&!Z&&-1===e.indexOf("<"))return w&&le?w.createHTML(e):e;if(n=Qe(e),!n)return ee?null:le?y:""}n&&Q&&Xe(n.firstChild);const u=bt(re?e:n);for(;i=u.nextNode();)ht(i),yt(i),i.content instanceof r&&Ct(i.content);if(re)return e;if(ee){if(te)for(c=q.call(n.ownerDocument);n.firstChild;)c.appendChild(n.firstChild);else c=n;return(z.shadowroot||z.shadowrootmode)&&(c=x.call(a,c,!0)),c}let p=Z?n.outerHTML:n.innerHTML;return Z&&M["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&$e(wt,n.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+p),Y&&Ve([T,C,B],e=>{p=Ke(p,e," ")}),w&&le?w.createHTML(p):p},l.setConfig=function(){Ne(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},l.clearConfig=function(){Ie=null,J=!1},l.isValidAttribute=function(e,t,l){Ie||Ne({});const n=xe(e),a=xe(t);return _t(n,a,l)},l.addHook=function(e,t){"function"==typeof t&&Le(I[e],t)},l.removeHook=function(e,t){if(void 0!==t){const l=Re(I[e],t);return-1===l?void 0:ze(I[e],l,1)[0]}return Me(I[e])},l.removeHooks=function(e){I[e]=[]},l.removeAllHooks=function(){I={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},l}();class Bt extends i.Component{constructor(){super(...arguments),this.state={screen:I(),imageId:"",externalImageIsSet:!1,imageSizeNotExist:!1}}getScreenLabelSuffix(){return ae(this.state.screen)}getAttributeValue(e=this.getScreenLabelSuffix()){const{blockAttributeKey:t,blockAttributes:l,allowScreens:n,repeater:a,repeaterItemIndex:o,repeaterItemKey:r,isSimpleRepeaterValue:i,repeaterGetAttributes:s}=this.props;let c=t;n&&e&&(c=t+e);let u=l[c];if(a){let l=i?null:t;n&&e&&(l=i?this.state.screen:c),u=s({key:r,childKey:l},o)||{}}return pe(u)}setAttributeValue(e){const{blockAttributeKey:t,setAttributes:l,allowScreens:n,repeater:a,repeaterItemIndex:o,repeaterItemKey:r,isSimpleRepeaterValue:i,repeaterSetAttributes:s}=this.props,c=this.getScreenLabelSuffix();let u=t;if(n&&c&&(u=t+c),a){let l=i?null:t;n&&c&&(l=i?this.state.screen:u),s({key:r,childKey:l},e,o)}else l({[u]:e})}componentDidMount(){const{allowScreens:e,allowDefaultImage:t}=this.props,{url:l,id:n,defaultValueIsSet:a}=this.getAttributeValue("");if(l&&!l.includes(qiBlocksEditor.vars.siteURL))this.onSelectURL(l),this.setState({externalImageIsSet:!0});else{n&&(this.setState({imageId:n}),this.updateImageSizeOption(n)),!t||a||l||n||(this.setAttributeValue({id:null,url:qiBlocksEditor.vars.defaultImage,alt:qiBlocksEditor.vars.defaultImagePlaceholder,caption:"",width:1200,height:800,custom_image_size:"",html:""}),this.setState({defaultImageIsSet:!0}));const o=[""];e&&(o.push("Tablet"),o.push("Mobile")),o.map(e=>{const{url:t,id:l}=this.getAttributeValue(e);t&&(0,qe.isBlobURL)(t)&&!l&&this.setAttributeValue({url:"",alt:"",caption:"",width:"",height:"",html:""})})}}setSVGIcon=(e,t,l,n)=>{const a=new XMLHttpRequest;null!=a&&(a.open("GET",t,!0),a.onreadystatechange=()=>{4===a.readyState&&200===a.status&&this.setAttributeValue({id:e,url:t,alt:l,caption:n,html:Ct.sanitize(a.responseText,{USE_PROFILES:{svg:!0,svgFilters:!0}})})},a.send())};onSelectImage=({id:e,url:t,alt:l,caption:n,width:a,height:o})=>{t.includes(".svg")?this.setSVGIcon(e,t,l,n):this.setAttributeValue({id:e,url:t,alt:l,caption:n,width:a,height:o}),this.setState({imageId:e,externalImageIsSet:!1}),this.updateImageSizeOption(e)};updateImageSizeOption=e=>{if(this.props.allowImageSizes){const t=setInterval(()=>{(0,p.select)("core").getMedia(e)&&(clearInterval(t),this.forceUpdate())},1e3)}};onSelectURL=e=>{e.includes(".svg")?this.setSVGIcon(null,e,"",""):this.setAttributeValue({id:null,url:e,alt:"",caption:"",width:"",height:"",html:""}),this.setState({externalImageIsSet:!1})};onUploadError=e=>{const{noticeOperations:t}=this.props;t.createErrorNotice(e)};removeImage=()=>{this.setAttributeValue({id:null,url:"",alt:"",caption:"",width:"",height:"",html:"",defaultValueIsSet:!!this.props.allowDefaultImage})};onImageSizeChange=e=>{const{customImageSizes:t}=this.props,l=(0,p.select)("core").getMedia(this.state.imageId);if(l){let n=e;t&&t.length>1&&(n=this.getImageURLbySize(e)||l.source_url),"custom"===e&&(n=l.source_url),this.setAttributeValue({id:l.id,url:n,alt:l.alt_text||"",caption:l.caption&&l.caption.raw||"",custom_image_size:e})}};getImageURLbySize(e){const t=this.getAttributeValue();let l="";if(t){const n=(0,p.select)("core").getMedia(t.id);if(!n)return"";const a=n.media_details.sizes;if(a&&0===Object.keys(a).length)this.setState({imageSizeNotExist:!0});else{this.setState({imageSizeNotExist:!1});for(const t in a)if(t.includes("qi_blocks_image_size_"+e.replace("-","_"))){l=a[t].source_url;break}}["","custom"].includes(e)&&this.setState({imageSizeNotExist:!1})}return l}getImageSizes(){const{imageSizes:t,customImageSizes:l}=this.props,n=this.getAttributeValue();let a=[];if(n){const o=(0,p.select)("core").getMedia(n.id);if(!o)return[];const r=o.media_details.sizes;if(r&&0===Object.keys(r).length&&a.push({label:(0,e.__)("Default","qi-blocks"),value:""}),l&&l.length>1)l.map(e=>{a.push({label:e.label,value:e.value})});else for(const e in r){const l=r[e],n=t.find(t=>t.slug===e);n&&a.push({label:n.name,value:l.source_url})}}return a}render(){const t={...this.props},l={...this.state},{label:n,help:a,noticeUI:o,allowedTypes:r,allowScreens:i,allowImageSizes:u}=t,p=this.getAttributeValue(),{id:m,url:b,alt:d,html:f}=p;t.onChangeScreen=e=>{this.setState({screen:e}),this.updateImageSizeOption(m)};let g=["qodef-image-option"];return b&&b.includes(".svg")&&g.push("qodef--svg"),wp.element.createElement(c.BaseControl,{className:g.join(" ")},wp.element.createElement("div",{className:"qodef-advanced-select-heading"},i?wp.element.createElement(de,{label:n,onChangeScreen:t.onChangeScreen}):wp.element.createElement(wp.element.Fragment,null,n&&wp.element.createElement("label",{className:"qodef-option-label"},n))),a&&wp.element.createElement("p",{className:"qodef-option-description"},a),b?wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("div",{className:"qodef-image-option-inner"},(0,qe.isBlobURL)(b)&&wp.element.createElement("div",{className:"qodef-image-option-spinner"},wp.element.createElement(c.Spinner,null)),wp.element.createElement(s.MediaUploadCheck,null,wp.element.createElement(s.MediaUpload,{allowedTypes:r,value:m,onSelect:this.onSelectImage,render:({open:t})=>wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("img",{src:b,alt:d}),wp.element.createElement("div",{className:"qodef-image-option-actions"},wp.element.createElement(c.Button,{icon:"edit",showTooltip:!0,label:(0,e.__)("Edit Image","qi-blocks"),onClick:t}),wp.element.createElement(c.Button,{icon:"trash",showTooltip:!0,label:(0,e.__)("Remove Image","qi-blocks"),onClick:this.removeImage})))}))),l.imageSizeNotExist&&wp.element.createElement("p",{className:"qodef-image-notice"},(0,e.__)("The Image has no predefined sizes, please set a custom image size.","qi-blocks")),l.externalImageIsSet&&wp.element.createElement("p",{className:"qodef-image-notice"},(0,e.__)("External image URL is set, please upload your image for this Element.","qi-blocks"))):wp.element.createElement(s.MediaPlaceholder,{allowedTypes:r,icon:"format-image",onSelect:this.onSelectImage,onSelectURL:this.onSelectURL,onError:this.onUploadError,notices:o}),u&&m&&!f&&wp.element.createElement("div",{className:"qodef-image-option-sizes"},wp.element.createElement(c.SelectControl,{label:(0,e.__)("Image Size","qi-blocks"),options:this.getImageSizes(),onChange:this.onImageSizeChange,value:void 0!==p.custom_image_size?p.custom_image_size:b})))}}Bt.defaultProps={label:(0,e.__)("Image","qi-blocks"),help:"",blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},allowedTypes:["image"],allowScreens:!1,allowDefaultImage:!1,allowImageSizes:!1,customImageSizes:[],repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",isSimpleRepeaterValue:!0,repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Nt=(0,p.withSelect)(e=>({imageSizes:e("core/block-editor")?.getSettings()?.imageSizes}))((0,c.withNotices)(Bt));class Pt extends i.Component{constructor(){super(...arguments),this.state={isPickerVisible:!1}}getAttributeValue(){const{defaultColor:e,blockAttributeKey:t,blockAttributes:l,repeater:n,repeaterItemIndex:a,repeaterItemKey:o,isSimpleRepeaterValue:r,repeaterGetAttributes:i}=this.props;let s=l[t];return n&&(s=i({key:o,childKey:r?"":t},a)),s||e}setAttributeValue(e){const{blockAttributeKey:t,setAttributes:l,repeater:n,repeaterItemIndex:a,repeaterItemKey:o,isSimpleRepeaterValue:r,repeaterSetAttributes:i}=this.props;n?i({key:o,childKey:r?"":t},e,a):l({[t]:e})}onChange=e=>{const{r:t,g:l,b:n,a}=e.rgb;let o="rgba("+[t,l,n,a].join(",")+")";this.props.setHEXValue&&(o=e.hex),this.setState({colorReset:!0}),this.setAttributeValue(o)};onClick=e=>{e.preventDefault();const t=this;t.setState({isPickerVisible:!this.state.isPickerVisible}),window.addEventListener("click",e=>{const l=document.querySelectorAll(".qodef-color-option.qodef--opened");l.length&&l.forEach(l=>{l.contains(e.target)||t.setState({isPickerVisible:!1})})})};onResetColor=e=>{e.preventDefault(),this.setState({isPickerVisible:!this.state.isPickerVisible}),this.setAttributeValue("")};render(){const{label:t,popup:l}=this.props;return wp.element.createElement(c.BaseControl,{className:"qodef-color-option "+(this.state.isPickerVisible?"qodef--opened":"")},wp.element.createElement("div",{className:"qodef-control-heading"},t&&wp.element.createElement("label",{className:"qodef-option-label"},t),wp.element.createElement(c.Button,{onClick:this.onClick,className:"qodef-color-indicator-button"},wp.element.createElement(c.ColorIndicator,{colorValue:this.getAttributeValue(),className:"qodef-color-indicator"}))),this.state.isPickerVisible&&wp.element.createElement("div",{className:`qodef-color-picker-wrapper ${l&&"qodef--popup"}`},wp.element.createElement(c.ColorPicker,{color:this.getAttributeValue(),onChangeComplete:this.onChange,disableAlpha:this.props.setHEXValue}),wp.element.createElement(c.Button,{onClick:this.onResetColor,isSecondary:!0},(0,e.__)("Reset Color","qi-blocks"))))}}Pt.defaultProps={label:(0,e.__)("Color","qi-blocks"),defaultColor:"#000",setHEXValue:!1,blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},popup:!0,repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",isSimpleRepeaterValue:!1,repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Ot=Pt;class Dt extends i.Component{getAttributeValue(){const{blockAttributeKey:e,blockAttributes:t,repeater:l,repeaterItemIndex:n,repeaterItemKey:a,repeaterGetAttributes:o}=this.props;let r=t[e];return l&&(r=o({key:a},n)||{}),pe(r)}setAttributeValue(e){const{blockAttributeKey:t,setAttributes:l,repeater:n,repeaterItemIndex:a,repeaterItemKey:o,repeaterSetAttributes:r}=this.props;n?r({key:o},e,a):l({[t]:e})}componentDidMount(){const{url:e,id:t}=this.getAttributeValue();e&&(0,qe.isBlobURL)(e)&&!t&&this.setAttributeValue({url:"",alt:""})}onSelectVideo=({id:e,url:t,alt:l})=>{this.setAttributeValue({id:e,url:t,alt:l})};onSelectURL=e=>{this.setAttributeValue({id:null,url:e,alt:""})};onUploadError=e=>{const{noticeOperations:t}=this.props;t.createErrorNotice(e)};removeVideo=()=>{this.setAttributeValue({id:null,url:"",alt:""})};render(){const t={...this.props},{label:l,description:n,noticeUI:a}=t,{id:o,url:r}=this.getAttributeValue();return wp.element.createElement(c.BaseControl,{className:"qodef-video-option"},l&&wp.element.createElement("label",{className:"qodef-option-label"},l),n&&wp.element.createElement("p",{className:"qodef-option-description"},n),r?wp.element.createElement("div",{className:"qodef-video-option-inner"},(0,qe.isBlobURL)(r)&&wp.element.createElement("div",{className:"qodef-video-option-spinner"},wp.element.createElement(c.Spinner,null)),wp.element.createElement(s.MediaUploadCheck,null,wp.element.createElement(s.MediaUpload,{allowedTypes:["video"],value:o,onSelect:this.onSelectVideo,render:({open:t})=>wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("video",{src:r}),wp.element.createElement("div",{className:"qodef-video-option-actions"},wp.element.createElement(c.Button,{icon:"edit",showTooltip:!0,label:(0,e.__)("Edit Video","qi-blocks"),onClick:t}),wp.element.createElement(c.Button,{icon:"trash",showTooltip:!0,label:(0,e.__)("Remove Video","qi-blocks"),onClick:this.removeVideo})))}))):wp.element.createElement(s.MediaPlaceholder,{allowedTypes:["video"],icon:"format-video",onSelect:this.onSelectVideo,onSelectURL:this.onSelectURL,onError:this.onUploadError,notices:a}))}}Dt.defaultProps={label:(0,e.__)("Video","qi-blocks"),description:"",blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Vt=(0,c.withNotices)(Dt),Rt=t=>{const l={...t},{attrNameTemplate:n,attrName:a,blockAttributes:o,setAttributes:r,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:m,previewScreen:b}=l,d=a||"Background",f=e=>le(n,d+e);l.getAttributeValue=(e,t="")=>{let l=e;t&&(l=e+t);let n=o[l];return i&&(n=m({key:u,childKey:l},s)),pe(n)},l.setAttributeValue=(e,t,l="")=>{let n=e;l&&(n=e+l),i?p({key:u,childKey:n},t,s):r({[n]:t})};let g=ae(b||I());return wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Nt,{label:(0,e.__)(`${d} Image`,"qi-blocks"),blockAttributeKey:f("Image"),blockAttributes:o,setAttributes:r,allowScreens:!0,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,isSimpleRepeaterValue:!1,repeaterSetAttributes:p,repeaterGetAttributes:m}),l.getAttributeValue(f("Image"))&&l.getAttributeValue(f("Image")).url&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(ge,{label:(0,e.__)(`${d} Position`,"qi-blocks"),blockAttributeKey:f("Position"),blockAttributes:o,setAttributes:r,selectOptions:me("background_position",!0,[{value:"custom",label:(0,e.__)("Custom","qi-blocks")}]),repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:m}),(""===g&&"custom"===l.getAttributeValue(f("Position"))||""!==g&&"custom"===l.getAttributeValue(f("Position"),g)||""!==g&&"custom"===l.getAttributeValue(f("Position"))&&["","custom"].includes(l.getAttributeValue(f("Position"),"Tablet"))&&""===l.getAttributeValue(f("Position"),g))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Se,{label:(0,e.__)("X Position","qi-blocks"),blockAttributeKey:f("XPosition"),setAttributes:r,blockAttributes:o,rangeMax:800,rangeMin:-800,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"xPosition",allowScreens:!0,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:m}),wp.element.createElement(Se,{label:(0,e.__)("Y Position","qi-blocks"),blockAttributeKey:f("YPosition"),setAttributes:r,blockAttributes:o,rangeMax:800,rangeMin:-800,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"yPosition",allowScreens:!0,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:m})),wp.element.createElement(c.SelectControl,{label:(0,e.__)(`${d} Attachment`,"qi-blocks"),value:l.getAttributeValue(f("Attachment")),options:me("background_attachment")||"",onChange:e=>l.setAttributeValue(f("Attachment"),e)}),wp.element.createElement(ge,{label:(0,e.__)(`${d} Repeat`,"qi-blocks"),blockAttributeKey:f("Repeat"),blockAttributes:o,setAttributes:r,selectOptions:me("background_repeat"),repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:m}),wp.element.createElement(ge,{label:(0,e.__)(`${d} Size`,"qi-blocks"),blockAttributeKey:f("Size"),blockAttributes:o,setAttributes:r,selectOptions:me("background_size",!0,[{value:"custom",label:(0,e.__)("Custom","qi-blocks")}]),repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:m}),"custom"===l.getAttributeValue(f("Size"),g)&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Se,{label:(0,e.__)("Custom Width","qi-blocks"),blockAttributeKey:f("SizeWidth"),setAttributes:r,blockAttributes:o,rangeMax:1e3,rangeMin:0,rangeDecimalMax:100,rangeDecimalMin:0,unitType:"xPosition",allowScreens:!0,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:m}))))};Rt.defaultProps={attrNameTemplate:"",attrName:"Background",blockAttributes:{},setAttributes:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{},previewScreen:""};const Mt=Rt,Lt=t=>{const l={...t},{attrNameTemplate:n,blockAttributes:a,setAttributes:o,includeVideoBG:r,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:m,previewScreen:b}=l,d=e=>le(n,e);l.getAttributeValue=(e,t="")=>{let l=a[e];if(i){let n=e;t&&(n=e+t),l=m({key:u,childKey:n},s)}return pe(l)},l.setAttributeValue=(e,t,l="")=>{if(i){let n=e;l&&(n=e+l),p({key:u,childKey:n},t,s)}else o({[e+l]:t})};const f=[{label:(0,e.__)("Classic","qi-blocks"),value:""},{label:(0,e.__)("Gradient","qi-blocks"),value:"gradient"}];return r&&f.push({label:(0,e.__)("Video","qi-blocks"),value:"video"}),wp.element.createElement("div",{className:"qodef-background-panel"},wp.element.createElement(c.SelectControl,{label:(0,e.__)("Background Type","qi-blocks"),value:l.getAttributeValue(d("BackgroundType")),options:f,onChange:e=>l.setAttributeValue(d("BackgroundType"),e)}),""===l.getAttributeValue(d("BackgroundType"))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Ot,{label:(0,e.__)("Background Color","qi-blocks"),blockAttributeKey:d("BackgroundColor"),blockAttributes:a,setAttributes:o,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:m}),wp.element.createElement(Mt,{attrNameTemplate:n,blockAttributes:a,setAttributes:o,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:m,previewScreen:b})),"gradient"===l.getAttributeValue(d("BackgroundType"))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Ot,{label:(0,e.__)("First Color","qi-blocks"),blockAttributeKey:d("BackgroundGradientColor1"),blockAttributes:a,setAttributes:o,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:m}),wp.element.createElement(c.RangeControl,{label:(0,e.__)("Location","qi-blocks"),value:l.getAttributeValue(d("BackgroundGradientLocation1")),onChange:e=>l.setAttributeValue(d("BackgroundGradientLocation1"),e),min:0,max:100,step:1}),wp.element.createElement(Ot,{label:(0,e.__)("Second Color","qi-blocks"),blockAttributeKey:d("BackgroundGradientColor2"),blockAttributes:a,setAttributes:o,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:m}),wp.element.createElement(c.RangeControl,{label:(0,e.__)("Location","qi-blocks"),value:l.getAttributeValue(d("BackgroundGradientLocation2")),onChange:e=>l.setAttributeValue(d("BackgroundGradientLocation2"),e),min:0,max:100,step:1}),wp.element.createElement(c.SelectControl,{label:(0,e.__)("Gradient Type","qi-blocks"),value:l.getAttributeValue(d("BackgroundGradientType")),options:[{label:(0,e.__)("Linear","qi-blocks"),value:"linear"},{label:(0,e.__)("Radial","qi-blocks"),value:"radial"}],onChange:e=>l.setAttributeValue(d("BackgroundGradientType"),e)}),"linear"===l.getAttributeValue(d("BackgroundGradientType"))&&wp.element.createElement(c.RangeControl,{label:(0,e.__)("Angle","qi-blocks"),value:l.getAttributeValue(d("BackgroundGradientTypeAngle")),onChange:e=>l.setAttributeValue(d("BackgroundGradientTypeAngle"),e),min:0,max:360,step:1}),"radial"===l.getAttributeValue(d("BackgroundGradientType"))&&wp.element.createElement(c.SelectControl,{label:(0,e.__)("Position","qi-blocks"),value:l.getAttributeValue(d("BackgroundGradientTypePosition")),options:me("background_position",!1),onChange:e=>l.setAttributeValue(d("BackgroundGradientTypePosition"),e)})),"video"===l.getAttributeValue(d("BackgroundType"))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Vt,{label:(0,e.__)("Video Link","qi-blocks"),description:(0,e.__)("Self hosted video file (mp4 is recommended)","qi-blocks"),blockAttributeKey:d("BackgroundVideoLink"),blockAttributes:a,setAttributes:o,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:m}),wp.element.createElement(c.TextControl,{type:"number",label:(0,e.__)("Start Time","qi-blocks"),help:(0,e.__)("Specify a start time (in seconds)","qi-blocks"),value:l.getAttributeValue(d("BackgroundVideoStartTime")),onChange:e=>l.setAttributeValue(d("BackgroundVideoStartTime"),ce(e))}),wp.element.createElement(c.TextControl,{type:"number",label:(0,e.__)("End Time","qi-blocks"),help:(0,e.__)("Specify an end time (in seconds)","qi-blocks"),value:l.getAttributeValue(d("BackgroundVideoEndTime")),onChange:e=>l.setAttributeValue(d("BackgroundVideoEndTime"),ce(e))}),wp.element.createElement(N,{label:(0,e.__)("Play Once","qi-blocks"),blockAttributeKey:d("BackgroundVideoPlayOnce"),blockAttributes:a,setAttributes:o,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:m}),wp.element.createElement(N,{label:(0,e.__)("Play On Mobile","qi-blocks"),blockAttributeKey:d("BackgroundVideoPlayOnMobile"),blockAttributes:a,setAttributes:o,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:m}),wp.element.createElement(Nt,{label:(0,e.__)("Background Fallback","qi-blocks"),blockAttributeKey:d("BackgroundVideoFallbackImage"),blockAttributes:a,setAttributes:o,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:m})))};Lt.defaultProps={attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},includeVideoBG:!1,repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{},previewScreen:""};const zt=Lt,Ut=e=>{const{blockAttributes:t}=e,l=ue(e,"all")&&e.attrNameTemplate||"",n=ue(e,"all")&&e.attrName||"Background",a=(e,t)=>le(l,n+e,t);let o={},r={},i={};return t[a("Attachment")]&&(o.backgroundAttachment=t[a("Attachment")]),Object.entries(E).map(([e])=>{let l=ae(e),n={};if(t[a("Image",l)]&&t[a("Image",l)].url&&(n.backgroundImage=`url(${t[a("Image",l)].url})`),t[a("Repeat",l)]&&(n.backgroundRepeat=t[a("Repeat",l)]),"custom"===t[a("Position",l)]){let e="",o="";(t[a("XPosition",l)]||t[a("XPositionDecimal",l)])&&(ie(t[a("XPositionUnit",l)])&&t[a("XPosition",l)]?e=parseInt(t[a("XPosition",l)],10)+t[a("XPositionUnit",l)]:se(t[a("XPositionUnit",l)])&&t[a("XPositionDecimal",l)]&&(e=parseFloat(t[a("XPositionDecimal",l)])+t[a("XPositionUnit",l)])),(t[a("YPosition",l)]||t[a("YPositionDecimal",l)])&&(ie(t[a("YPositionUnit",l)])&&t[a("YPosition",l)]?o=parseInt(t[a("YPosition",l)],10)+t[a("YPositionUnit",l)]:se(t[a("YPositionUnit",l)])&&t[a("YPositionDecimal",l)]&&(o=parseFloat(t[a("YPositionDecimal",l)])+t[a("YPositionUnit",l)])),""===e&&""===o||(n.backgroundPosition=e+" "+o)}else t[a("Position",l)]&&(n.backgroundPosition=t[a("Position",l)]);"custom"===t[a("Size",l)]?(t[a("SizeWidth",l)]||t[a("SizeWidthDecimal",l)])&&(ie(t[a("SizeWidthUnit",l)])&&t[a("SizeWidth",l)]?n.backgroundSize=parseInt(t[a("SizeWidth",l)],10)+t[a("SizeWidthUnit",l)]+" auto":se(t[a("SizeWidthUnit",l)])&&t[a("SizeWidthDecimal",l)]&&(n.backgroundSize=parseFloat(t[a("SizeWidthDecimal",l)])+t[a("SizeWidthUnit",l)]+" auto")):t[a("Size",l)]&&(n.backgroundSize=t[a("Size",l)]),Object.keys(n).length>0&&Object.entries(n).map(([t,l])=>{switch(e){case"desktop":o[t]=l;break;case"tablet":r[t]=l;break;case"mobile":i[t]=l}})}),{desktop:o,tablet:r,mobile:i}};Ut.defaultProps={attrNameTemplate:"",attrName:"Background",blockAttributes:{}};const Ft=Ut,jt=e=>{const{blockAttributes:t}=e,l=ue(e,"all")&&e.attrNameTemplate||"",n=(e,t)=>le(l,e,t),o=t[n("BackgroundType")]||"";let r={},i={},s={};if("gradient"===o){let e={type:"linear",position:"",color_1:"",location_1:"",color_2:"",location_2:""};t[n("BackgroundGradientColor1")]&&(e.color_1=t[n("BackgroundGradientColor1")]),ue(t[n("BackgroundGradientLocation1")])&&(e.location_1=ce(t[n("BackgroundGradientLocation1")])+"%"),t[n("BackgroundGradientColor2")]&&(e.color_2=t[n("BackgroundGradientColor2")]),ue(t[n("BackgroundGradientLocation2")])&&(e.location_2=ce(t[n("BackgroundGradientLocation2")])+"%"),t[n("BackgroundGradientType")]&&(e.type=t[n("BackgroundGradientType")]),"linear"===e.type&&""!==t[n("BackgroundGradientTypeAngle")]?e.position=ce(t[n("BackgroundGradientTypeAngle")])+"deg":"radial"===e.type&&t[n("BackgroundGradientTypePosition")]&&(e.position="at "+t[n("BackgroundGradientTypePosition")]),e.type&&e.position&&e.color_1&&e.location_1&&e.color_2&&e.location_2?(r.backgroundColor="transparent",r.backgroundImage=`${e.type}-gradient(${e.position}, ${e.color_1} ${e.location_1}, ${e.color_2} ${e.location_2})`):e.color_1&&(r.backgroundColor=e.color_1)}else"video"===o?!t[n("BackgroundVideoPlayOnMobile")]&&t[n("BackgroundVideoFallbackImage")]&&t[n("BackgroundVideoFallbackImage")].url&&(i.backgroundImage=`url(${t[n("BackgroundVideoFallbackImage")].url})`,i.backgroundPosition="center",i.backgroundSize="cover"):(t[n("BackgroundColor")]&&(r.backgroundColor=t[n("BackgroundColor")]),s=Ft({attrNameTemplate:l,blockAttributes:t}));return a()({desktop:r,tablet:{},mobile:i},s)};jt.defaultProps={attrNameTemplate:"",blockAttributes:{}};const Kt=jt;class Gt extends i.Component{constructor(){super(...arguments),this.state={screen:I(),linkedInputs:!1}}getScreenLabelSuffix(e){const t=e||this.state.screen;return ae(t)}getAttributeValue(e,t=""){const{blockAttributes:l,allowScreens:n,repeater:a,repeaterItemIndex:o,repeaterItemKey:r,repeaterGetAttributes:i}=this.props;let s=e;n&&t&&(s=e+t);let c=l[s];return a&&(c=i({key:r,childKey:s},o)),pe(c)}setAttributeValue(e,t,l=""){const{setAttributes:n,allowScreens:a,repeater:o,repeaterItemIndex:r,repeaterItemKey:i,repeaterSetAttributes:s}=this.props;let c=e;a&&l&&(c=e+l),o?s({key:i,childKey:c},t,r):n({[c]:t})}render(){const t={...this.props},{label:l,allowScreens:n,rangeMax:a,rangeMin:o,rangeStep:r,rangeDecimalMax:i,rangeDecimalMin:s,rangeDecimalStep:u,repeater:p}=t,m=e=>le(t.attrNameTemplate,t.attrName,e),b=this.getScreenLabelSuffix(),d=m(),f=m("Unit"+b),g=["Top","Right","Bottom","Left"],h=()=>{const e=this.getAttributeValue(f)||"px";return ie(e)},k="margin"===t.attrName.toLowerCase()||t.allowNegativeValues?-1*(h()?a:i):h()?o:s;return t.onChange=(e,t)=>{h()?this.setAttributeValue(m(t),ce(e),b):this.setAttributeValue(m(`${t}Decimal`),ce(e,"decimal"),b)},t.getValue=e=>{let t;return t=h()?""!==this.getAttributeValue(m(e),b)?parseInt(this.getAttributeValue(m(e),b),10):"":""!==this.getAttributeValue(m(`${e}Decimal`),b)?parseFloat(this.getAttributeValue(m(`${e}Decimal`),b)):"",t},t.getPlaceholderValue=e=>{let t="";return"Tablet"===b?t=h()?""!==this.getAttributeValue(m(e))?parseInt(this.getAttributeValue(m(e)),10):"":""!==this.getAttributeValue(m(`${e}Decimal`))?parseFloat(this.getAttributeValue(m(`${e}Decimal`))):"":"Mobile"===b&&(h()?""!==this.getAttributeValue(m(e),"Tablet")?t=parseInt(this.getAttributeValue(m(e),"Tablet"),10):""!==this.getAttributeValue(m(e))&&(t=parseInt(this.getAttributeValue(m(e)),10)):""!==this.getAttributeValue(m(`${e}Decimal`),"Tablet")?t=parseInt(this.getAttributeValue(m(`${e}Decimal`),"Tablet"),10):""!==this.getAttributeValue(m(`${e}Decimal`))&&(t=parseInt(this.getAttributeValue(m(`${e}Decimal`)),10))),t},t.getRangeValue=()=>{let e="";return[...g].some(l=>{t.disableDirections.includes(l)||(e=t.getValue(l))}),e},t.onRangeChange=e=>{[...g].map(l=>{t.disableDirections.length>0&&t.disableDirections.includes(l)?t.onChange("",l):t.onChange(e,l)})},t.onChangeScreen=e=>{this.setState({screen:e})},t.onLinkInputs=e=>{e.preventDefault(),this.state.linkedInputs||[...g].map(e=>{t.disableDirections.length>0&&t.disableDirections.includes(e)?t.onChange("",e):t.onChange(t.getValue("Top"),e)}),this.setState({linkedInputs:!this.state.linkedInputs})},t.onChangeUnit=e=>{e.preventDefault();const t=p?200:0,l=e.target.getAttribute("data-unit"),n=this.getAttributeValue(f)||"px";this.setAttributeValue(f,l),setTimeout(()=>{l!==n&&[...g].map(e=>{const t=d+e,a=`${t}Decimal`;let o=t+b,r=a+b;"px"!==l&&(o=a+b),"px"===n&&(r=t+b,this.setAttributeValue(r,"")),this.setAttributeValue(o,this.getAttributeValue(r))})},t)},wp.element.createElement(c.BaseControl,{className:"qodef-input-control"},wp.element.createElement("div",{className:"qodef-control-heading"},n?wp.element.createElement("div",{className:"qodef-input-control-screens"},wp.element.createElement(de,{label:l,onChangeScreen:t.onChangeScreen})):wp.element.createElement("label",{className:"qodef-option-label"},l),t.allowUnitControl&&wp.element.createElement(ke,{unitType:t.unitType,unitValue:this.getAttributeValue(f),onChangeUnit:t.onChangeUnit}),t.allowLinkedControl&&wp.element.createElement(c.Button,{icon:this.state.linkedInputs?"editor-unlink":"admin-links",onClick:t.onLinkInputs,className:"qodef-link-inputs-button "+(this.state.linkedInputs?"linked":"unlinked")})),this.state.linkedInputs?wp.element.createElement(c.RangeControl,{min:o,max:h()?a:i,step:h()?r:u,onChange:t.onRangeChange,allowReset:!0,value:t.getRangeValue()}):wp.element.createElement("ul",null,[...g].map((l,n)=>wp.element.createElement("li",{className:"qodef-input-control-item",key:n},t.disableDirections.length>0&&t.disableDirections.includes(l)?wp.element.createElement("div",{className:"components-base-control__field"},wp.element.createElement("label",null,(0,e.__)(l,"qi-blocks")),wp.element.createElement("input",{className:"components-text-control__input",type:"text",disabled:!0,value:(0,e.__)("auto","qi-blocks")})):wp.element.createElement(c.TextControl,{type:"number",value:t.getValue(l),placeholder:t.getPlaceholderValue(l),onChange:e=>t.onChange(e,l),label:(0,e.__)(l,"qi-blocks"),min:k,max:h()?a:i,step:h()?r:u})))))}}Gt.defaultProps={label:"",attrNameTemplate:"",attrName:"",blockAttributes:{},setAttributes:()=>{},unitType:"space",allowScreens:!0,allowNegativeValues:!1,disableDirections:[],allowUnitControl:!0,allowLinkedControl:!0,rangeMax:600,rangeMin:0,rangeStep:1,rangeDecimalMax:100,rangeDecimalMin:0,rangeDecimalStep:.01,repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Wt=Gt,Ht=t=>{const l={...t},{attrNameTemplate:n,blockAttributes:a,setAttributes:o,disableWidthDirections:r,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:m}=l,b=e=>le(n,e);return l.getAttributeValue=(e,t="")=>{let l=a[e];if(i){let n=e;t&&(n=e+t),l=m({key:u,childKey:n},s)}return pe(l)},l.setAttributeValue=(e,t,l="")=>{if(i){let n=e;l&&(n=e+l),p({key:u,childKey:n},t,s)}else o({[e+l]:t})},wp.element.createElement("div",{className:"qodef-border-panel"},wp.element.createElement(c.SelectControl,{label:(0,e.__)("Border Type","qi-blocks"),value:l.getAttributeValue(b("BorderStyle")),options:[{label:(0,e.__)("Default","qi-blocks"),value:""},{label:(0,e.__)("None","qi-blocks"),value:"none"},{label:(0,e.__)("Double","qi-blocks"),value:"double"},{label:(0,e.__)("Groove","qi-blocks"),value:"groove"},...me("border_style",!1)],onChange:e=>l.setAttributeValue(b("BorderStyle"),e)}),!["","none"].includes(a[b("BorderStyle")])&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Wt,{label:(0,e.__)("Border Width","qi-blocks"),attrName:b("BorderWidth"),blockAttributes:a,setAttributes:o,allowUnitControl:!1,disableDirections:r,rangeMax:20,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:m}),(l.allowBorderColor??!0)&&wp.element.createElement(Ot,{label:(0,e.__)("Border Color","qi-blocks"),blockAttributeKey:b("BorderColor"),blockAttributes:a,setAttributes:o,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:m})),(l.allowBorderRadius??!0)&&wp.element.createElement(Wt,{label:(0,e.__)("Border Radius","qi-blocks"),attrName:b("BorderRadius"),blockAttributes:a,setAttributes:o,unitType:"pxAndPercent",repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:m}))};Ht.defaultProps={attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},allowBorderColor:!0,allowBorderRadius:!0,disableWidthDirections:[],repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const $t=Ht,Yt=e=>{const t=t=>le(e.attrNameTemplate,e.attrName,t),l=ue(e,"all")&&void 0!==e.disableDirections&&e.disableDirections.length>0?e.disableDirections:[],n=ue(e,"all")&&void 0!==e.isImportant&&e.isImportant?" !important":"",{blockAttributes:a}=e,o=["Top","Right","Bottom","Left"];let r={},i={},s={};return Object.entries(E).map(([c])=>{const u=ae(c),p=t("Unit"+u),m="p"===a[p]?"%":a[p]||"px";[...o].map((p,b)=>{const d=a[t(p+u)],f=a[t(`${p}Decimal`+u)];if(ue(d)||ue(f)){let t;const a=e.attrName?e.attrName.toLowerCase():"";if(a.includes("border")){if(a.includes("width"))t=`border${p}Width`;else if(a.includes("radius")){let e,l,n;l=b%2?o[b-1]:p,n=b%2?p:o[o.length-b-1],e=`${l}${n}`,t=`border${e}Radius`}}else t=e.attrName?`${a}${p}`:p.toLowerCase();let u="";if(ie(m)&&""!==d?u=l.length>0&&l.includes(p)?"":parseInt(d,10)+m:se(m)&&""!==f&&(u=l.length>0&&l.includes(p)?"":parseFloat(f)+m),u)switch(c){case"desktop":r[t]=u+n;break;case"tablet":i[t]=u+n;break;case"mobile":s[t]=u+n}}})}),{desktop:r,tablet:i,mobile:s}};Yt.defaultProps={attrNameTemplate:"",attrName:"",blockAttributes:{},disableDirections:[],isImportant:!1};const Xt=Yt,Zt=e=>{const{blockAttributes:t}=e,l=ue(e,"all")&&e.attrNameTemplate||"",n=ue(e,"all")&&e.disableWidthDirections||[],o=!ue(e,"all")||(e.allowBorderColor??!0),r=(e,t)=>le(l,e,t);let i={},s={};const c=!ue(e,"all")||(e.allowBorderRadius??!0)?Xt({blockAttributes:t,attrNameTemplate:l,attrName:"BorderRadius",disableDirections:n}):{};return t[r("BorderStyle")]&&(i.borderStyle=t[r("BorderStyle")],o&&t[r("BorderColor")]&&(i.borderColor=t[r("BorderColor")]),s=Xt({attrNameTemplate:l,attrName:"BorderWidth",blockAttributes:t})),a()({desktop:i,tablet:{},mobile:{}},s,c)};Zt.defaultProps={attrNameTemplate:"",allowBorderColor:!0,allowBorderRadius:!0,blockAttributes:{}};const Jt=Zt,Qt=t=>{const l={...t},{attrNameTemplate:n,blockAttributes:a,setAttributes:o,excludeOptions:r}=l,s=e=>le(n,e),[u,p]=(0,i.useState)(!1);let m=["qodef-box-shadow-panel"];return l.popup&&m.push("qodef--has-popup"),u&&m.push("qodef--opened"),l.onClick=()=>{p(e=>!e),window.addEventListener("click",e=>{const t=document.querySelectorAll(".qodef-box-shadow-panel.qodef--opened");t.length&&t.forEach(t=>{t.contains(e.target)||p(!1)})})},wp.element.createElement("div",{className:m.join(" ")},wp.element.createElement("div",{className:"qodef-box-shadow-panel-heading"},l.label&&wp.element.createElement("label",{className:"qodef-option-label"},l.label),l.popup&&wp.element.createElement(c.Button,{icon:"edit",showTooltip:!0,label:(0,e.__)("Open Panel","qi-blocks"),onClick:l.onClick})),wp.element.createElement("div",{className:"qodef-box-shadow-panel-content"},wp.element.createElement(Ot,{label:(0,e.__)("Color","qi-blocks"),blockAttributeKey:s("BoxShadowColor"),blockAttributes:a,setAttributes:o,popup:!1}),wp.element.createElement(c.RangeControl,{label:(0,e.__)("Horizontal","qi-blocks"),value:a[s("BoxShadowHorizontal")],onChange:e=>o({[s("BoxShadowHorizontal")]:e}),min:-100,max:100,step:1,allowReset:!0}),wp.element.createElement(c.RangeControl,{label:(0,e.__)("Vertical","qi-blocks"),value:a[s("BoxShadowVertical")],onChange:e=>o({[s("BoxShadowVertical")]:e}),min:-100,max:100,step:1,allowReset:!0}),wp.element.createElement(c.RangeControl,{label:(0,e.__)("Blur","qi-blocks"),value:a[s("BoxShadowBlur")],onChange:e=>o({[s("BoxShadowBlur")]:e}),min:0,max:100,step:1,allowReset:!0}),wp.element.createElement(c.RangeControl,{label:(0,e.__)("Spread","qi-blocks"),value:a[s("BoxShadowSpread")],onChange:e=>o({[s("BoxShadowSpread")]:e}),min:-100,max:100,step:1,allowReset:!0}),(b="position",!(r&&r.length&&r.includes(b))&&wp.element.createElement(c.SelectControl,{label:(0,e.__)("Position","qi-blocks"),value:a[s("BoxShadowPosition")],options:[{label:(0,e.__)("Outline","qi-blocks"),value:""},{label:(0,e.__)("Inset","qi-blocks"),value:"inset"}],onChange:e=>o({[s("BoxShadowPosition")]:e})}))));var b};Qt.defaultProps={label:(0,e.__)("Box Shadow","qi-blocks"),attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},excludeOptions:[],popup:!1};const el=Qt,tl=e=>{const{blockAttributes:t,excludeOptions:l}=e,n=ue(e,"all")&&e.attrNameTemplate||"",a=(e,t)=>le(n,e,t);let o={},r={x:0,y:0,blur:0,spread:0,color:"",position:""};var i;return t[a("BoxShadowColor")]&&(r.color=t[a("BoxShadowColor")]),""!==t[a("BoxShadowHorizontal")]&&(r.x=t[a("BoxShadowHorizontal")]),""!==t[a("BoxShadowVertical")]&&(r.y=t[a("BoxShadowVertical")]),""!==t[a("BoxShadowBlur")]&&(r.blur=t[a("BoxShadowBlur")]),""!==t[a("BoxShadowSpread")]&&(r.spread=t[a("BoxShadowSpread")]),i="position",l&&l.length&&l.includes(i)||!t[a("BoxShadowPosition")]||(r.position=t[a("BoxShadowPosition")]),r.color&&(o.boxShadow=r.x+"px "+r.y+"px "+r.blur+"px "+r.spread+"px "+r.color+" "+r.position),{desktop:o,tablet:{},mobile:{}}};tl.defaultProps={attrNameTemplate:"",blockAttributes:{}};const ll=tl;class nl extends i.Component{render(){const{blockAttributes:t,setAttributes:l,excludePanels:n,previewScreen:a,blockName:o}=this.props,r=(e,t="")=>le("",e,t),i=J();n&&n.length&&n.forEach(e=>{i.splice(i.indexOf(e),1)});let s=ae(a);return wp.element.createElement("div",{className:"qodef-advanced-panel"},i.includes("advanced")&&wp.element.createElement(c.PanelBody,{title:(0,e.__)("Advanced","qi-blocks")},wp.element.createElement(Wt,{label:(0,e.__)("Margin","qi-blocks"),attrName:r("Margin"),blockAttributes:t,setAttributes:l}),wp.element.createElement(Wt,{label:(0,e.__)("Padding","qi-blocks"),attrName:r("Padding"),blockAttributes:t,setAttributes:l}),wp.element.createElement(c.TextControl,{type:"number",label:(0,e.__)("Z-Index","qi-blocks"),value:t[r("zIndex")],onChange:e=>l({[r("zIndex")]:ce(e)})}),wp.element.createElement(c.TextControl,{label:(0,e.__)("CSS ID","qi-blocks"),value:t[r("cssId")],onChange:e=>l({[r("cssId")]:e})}),wp.element.createElement(c.TextControl,{label:(0,e.__)("CSS Classes","qi-blocks"),value:t[r("cssClasses")],onChange:e=>l({[r("cssClasses")]:e})})),i.includes("motion-effects")&&wp.element.createElement(c.PanelBody,{title:(0,e.__)("Motion Effects","qi-blocks"),initialOpen:!1},wp.element.createElement(c.SelectControl,{label:(0,e.__)("Entrance Animation","qi-blocks"),value:t[r("EntranceAnimation")],options:[{label:(0,e.__)("None","qi-blocks"),value:""},{label:(0,e.__)("Back In Down","qi-blocks"),value:"backInDown"},{label:(0,e.__)("Back In Left","qi-blocks"),value:"backInLeft"},{label:(0,e.__)("Back In Right","qi-blocks"),value:"backInRight"},{label:(0,e.__)("Back In Up","qi-blocks"),value:"backInUp"},{label:(0,e.__)("Bounce","qi-blocks"),value:"bounce"},{label:(0,e.__)("Bounce In","qi-blocks"),value:"bounceIn"},{label:(0,e.__)("Bounce In Down","qi-blocks"),value:"bounceInDown"},{label:(0,e.__)("Bounce In Left","qi-blocks"),value:"bounceInLeft"},{label:(0,e.__)("Bounce In Right","qi-blocks"),value:"bounceInRight"},{label:(0,e.__)("Bounce In Up","qi-blocks"),value:"bounceInUp"},{label:(0,e.__)("Fade In","qi-blocks"),value:"fadeIn"},{label:(0,e.__)("Fade In Down","qi-blocks"),value:"fadeInDown"},{label:(0,e.__)("Fade In Down Big","qi-blocks"),value:"fadeInDownBig"},{label:(0,e.__)("Fade In Left","qi-blocks"),value:"fadeInLeft"},{label:(0,e.__)("Fade In Left Big","qi-blocks"),value:"fadeInLeftBig"},{label:(0,e.__)("Fade In Right","qi-blocks"),value:"fadeInRight"},{label:(0,e.__)("Fade In Right Big","qi-blocks"),value:"fadeInRightBig"},{label:(0,e.__)("Fade In Up","qi-blocks"),value:"fadeInUp"},{label:(0,e.__)("Fade In Up Big","qi-blocks"),value:"fadeInUpBig"},{label:(0,e.__)("Fade In Top Left","qi-blocks"),value:"fadeInTopLeft"},{label:(0,e.__)("Fade In Top Right","qi-blocks"),value:"fadeInTopRight"},{label:(0,e.__)("Fade In Bottom Left","qi-blocks"),value:"fadeInBottomLeft"},{label:(0,e.__)("Fade In Bottom Right","qi-blocks"),value:"fadeInBottomRight"},{label:(0,e.__)("Flash","qi-blocks"),value:"flash"},{label:(0,e.__)("Flip","qi-blocks"),value:"flip"},{label:(0,e.__)("Flip In X","qi-blocks"),value:"flipInX"},{label:(0,e.__)("Flip In Y","qi-blocks"),value:"flipInY"},{label:(0,e.__)("Head Shake","qi-blocks"),value:"headShake"},{label:(0,e.__)("Heart Beat","qi-blocks"),value:"heartBeat"},{label:(0,e.__)("Jack In The Box","qi-blocks"),value:"jackInTheBox"},{label:(0,e.__)("Jello","qi-blocks"),value:"jello"},{label:(0,e.__)("Light Speed In Right","qi-blocks"),value:"lightSpeedInRight"},{label:(0,e.__)("Light Speed In Left","qi-blocks"),value:"lightSpeedInLeft"},{label:(0,e.__)("Pulse","qi-blocks"),value:"pulse"},{label:(0,e.__)("Roll In","qi-blocks"),value:"rollIn"},{label:(0,e.__)("Rotate In","qi-blocks"),value:"rotateIn"},{label:(0,e.__)("Rotate In Down Left","qi-blocks"),value:"rotateInDownLeft"},{label:(0,e.__)("Rotate In Down Right","qi-blocks"),value:"rotateInDownRight"},{label:(0,e.__)("Rotate In Up Left","qi-blocks"),value:"rotateInUpLeft"},{label:(0,e.__)("Rotate In Up Right","qi-blocks"),value:"rotateInUpRight"},{label:(0,e.__)("Rubber Band","qi-blocks"),value:"rubberBand"},{label:(0,e.__)("Shake X","qi-blocks"),value:"shakeX"},{label:(0,e.__)("Shake Y","qi-blocks"),value:"shakeY"},{label:(0,e.__)("Slide In Down","qi-blocks"),value:"slideInDown"},{label:(0,e.__)("Slide In Left","qi-blocks"),value:"slideInLeft"},{label:(0,e.__)("Slide In Right","qi-blocks"),value:"slideInRight"},{label:(0,e.__)("Slide In Up","qi-blocks"),value:"slideInUp"},{label:(0,e.__)("Swing","qi-blocks"),value:"swing"},{label:(0,e.__)("Tada","qi-blocks"),value:"tada"},{label:(0,e.__)("Wobble","qi-blocks"),value:"wobble"},{label:(0,e.__)("Zoom In","qi-blocks"),value:"zoomIn"},{label:(0,e.__)("Zoom In Down","qi-blocks"),value:"zoomInDown"},{label:(0,e.__)("Zoom In Left","qi-blocks"),value:"zoomInLeft"},{label:(0,e.__)("Zoom In Right","qi-blocks"),value:"zoomInRight"},{label:(0,e.__)("Zoom In Up","qi-blocks"),value:"zoomInUp"}],onChange:e=>{l({[r("EntranceAnimation")]:e}),setTimeout(()=>{qiBlocksEditor.qodefTriggerBlockAnimation.triggerAnimation(t.uniqueClass)},300)}}),void 0!==t[r("EntranceAnimation")]&&""!==t[r("EntranceAnimation")]&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(c.SelectControl,{label:(0,e.__)("Animation Duration","qi-blocks"),value:t[r("EntranceAnimationDuration")],options:[{label:(0,e.__)("Slower","qi-blocks"),value:"slower"},{label:(0,e.__)("Slow","qi-blocks"),value:"slow"},{label:(0,e.__)("Normal","qi-blocks"),value:"normal"},{label:(0,e.__)("Fast","qi-blocks"),value:"fast"},{label:(0,e.__)("Faster","qi-blocks"),value:"faster"}],onChange:e=>{l({[r("EntranceAnimationDuration")]:e}),setTimeout(()=>{qiBlocksEditor.qodefTriggerBlockAnimation.triggerAnimation(t.uniqueClass)},300)}}),wp.element.createElement(c.TextControl,{type:"number",label:(0,e.__)("Animation Delay (ms)","qi-blocks"),value:t[r("EntranceAnimationDelay")],min:0,step:100,onChange:e=>{l({[r("EntranceAnimationDelay")]:ce(e)}),qiBlocksEditor.qodefTriggerBlockAnimation.triggerAnimation(t.uniqueClass,!0)}}))),i.includes("background")&&wp.element.createElement(c.PanelBody,{title:(0,e.__)("Background","qi-blocks"),initialOpen:!1},wp.element.createElement(zt,{attrNameTemplate:"Advanced",blockAttributes:t,setAttributes:l,previewScreen:a})),i.includes("border")&&wp.element.createElement(c.PanelBody,{title:(0,e.__)("Border","qi-blocks"),initialOpen:!1},wp.element.createElement($t,{attrNameTemplate:"Advanced",blockAttributes:t,setAttributes:l}),wp.element.createElement(el,{attrNameTemplate:"Advanced",blockAttributes:t,setAttributes:l,popup:!0})),i.includes("positioning")&&wp.element.createElement(c.PanelBody,{title:(0,e.__)("Positioning","qi-blocks"),initialOpen:!1},wp.element.createElement(ge,{label:(0,e.__)("Width","qi-blocks"),blockAttributeKey:r("BlockWidth"),blockAttributes:t,setAttributes:l,selectOptions:[{label:(0,e.__)("Default","qi-blocks"),value:""},{label:(0,e.__)("Full Width (100%)","qi-blocks"),value:"full-width"},{label:(0,e.__)("Inline (auto)","qi-blocks"),value:"inline"},{label:(0,e.__)("Custom","qi-blocks"),value:"custom"}]}),(""===s&&"custom"===t[r("BlockWidth")]||""!==s&&"custom"===t[r("BlockWidth",s)]||""!==s&&"custom"===t[r("BlockWidth")]&&["","custom"].includes(t[r("BlockWidth","Tablet")])&&""===t[r("BlockWidth",s)])&&wp.element.createElement(Se,{label:(0,e.__)("Custom Width","qi-blocks"),blockAttributeKey:r("BlockCustomWidth"),setAttributes:l,blockAttributes:t,rangeMax:1e3,rangeDecimalMax:100,unitType:"pxPercentVw",allowScreens:!0}),wp.element.createElement(c.SelectControl,{label:(0,e.__)("Position","qi-blocks"),value:t[r("BlockPosition")],options:[{label:(0,e.__)("Default","qi-blocks"),value:""},{label:(0,e.__)("Absolute","qi-blocks"),value:"absolute"},{label:(0,e.__)("Relative","qi-blocks"),value:"relative"},{label:(0,e.__)("Fixed","qi-blocks"),value:"fixed"}],onChange:e=>{l({[r("BlockPosition")]:e})}}),""!==t[r("BlockPosition")]&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(c.SelectControl,{label:(0,e.__)("Horizontal Orientation","qi-blocks"),value:t[r("PositionHorizontalOrientation")],options:[{label:(0,e.__)("Left","qi-blocks"),value:"left"},{label:(0,e.__)("Right","qi-blocks"),value:"right"}],onChange:e=>l({[r("PositionHorizontalOrientation")]:e})}),wp.element.createElement(Se,{label:(0,e.__)("Offset","qi-blocks"),blockAttributeKey:r("PositionHorizontalOffset"),setAttributes:l,blockAttributes:t,rangeMax:1e3,rangeMin:-1e3,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"measure",allowScreens:!0}),wp.element.createElement(c.SelectControl,{label:(0,e.__)("Vertical Orientation","qi-blocks"),value:t[r("PositionVerticalOrientation")],options:[{label:(0,e.__)("Top","qi-blocks"),value:"Top"},{label:(0,e.__)("Bottom","qi-blocks"),value:"bottom"}],onChange:e=>l({[r("PositionVerticalOrientation")]:e})}),wp.element.createElement(Se,{label:(0,e.__)("Offset","qi-blocks"),blockAttributeKey:r("PositionVerticalOffset"),setAttributes:l,blockAttributes:t,rangeMax:1e3,rangeMin:-1e3,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"measure",allowScreens:!0}))),i.includes("responsive")&&wp.element.createElement(c.PanelBody,{title:(0,e.__)("Responsive","qi-blocks"),initialOpen:!1},wp.element.createElement(O,{blockAttributes:t,setAttributes:l})),qiBlocksEditor.vars?.advancedBlockPanel&&wp.element.createElement(wp.element.Fragment,null,Object.entries(qiBlocksEditor.vars.advancedBlockPanel).map(([t,l],n)=>{let a="";if("help"===t?a=(0,e.__)("Help","qi-blocks"):"features"===t&&(a=(0,e.__)("Get more features","qi-blocks")),l.length<=0||"blocks"===t)return"";const r="help"===t,i=o?o.replace("qi-blocks/",""):"",s=l.map((l,n)=>{let a=l?.link;if(0===n&&"help"===t&&i){const e=qiBlocksEditor.vars.advancedBlockPanel?.blocks[i]||"";e&&e?.demo&&(a=e?.demo+"?utm_source=dash&utm_medium=qiblocks&utm_campaign=blocks")}return wp.element.createElement("div",{className:"qodef-m-item"},l?.image?wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("a",{className:"qodef-m-item-image-link",href:l?.link,target:"_blank",rel:"noreferrer"},wp.element.createElement("img",{className:"qodef-m-item-image",src:l.image,alt:l?.title})),wp.element.createElement("p",{className:"qodef-m-item-title"},l?.title),wp.element.createElement("a",{className:"qodef-m-item-button",href:l?.link,target:"_blank",rel:"noreferrer"},(0,e.__)("Upgrade","qi-blocks"))):wp.element.createElement("a",{className:"qodef-m-item-link",href:a,target:"_blank",rel:"noreferrer"},l?.title))});return wp.element.createElement(c.PanelBody,{title:a,className:`qodef-advanced-block-panel-features ${"qodef--"+t} qodef-m`,key:n,initialOpen:r},s)})))}}nl.defaultProps={blockAttributes:{},setAttributes:()=>{},excludePanels:[],previewScreen:"desktop",blockName:""};const al=(0,p.withSelect)(e=>{let t="desktop";return e("core/edit-post")&&(t="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-post")?.__experimentalGetPreviewDeviceType()?.toLowerCase()),e("core/edit-site")&&(t="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-site").__experimentalGetPreviewDeviceType().toLowerCase()),{previewScreen:t,blockName:e("core/block-editor")?.getSelectedBlock()?.name}})(nl),ol=e=>{const{blockAttributes:t}=e,l=(e,t="")=>le("",e,t),n=ue(e,"all")&&e.excludePanels||[],o=ue(e,"all")&&e.includePanels||[];let r=o&&o.length?o:J();n&&n.length&&n.forEach(e=>{r.splice(r.indexOf(e),1)});let i={},s={},c={},u={},p={};r.includes("advanced")&&(ue(t[l("zIndex")])&&(i.zIndex=ce(t[l("zIndex")])),u=Xt({attrName:l("Margin"),blockAttributes:t}),p=Xt({attrName:l("Padding"),blockAttributes:t})),r.includes("motion-effects")&&void 0!==t[l("EntranceAnimation")]&&""!==t[l("EntranceAnimation")]&&t[l("EntranceAnimationDelay")]&&(i.animationDelay=ce(t[l("EntranceAnimationDelay")])+"ms");let m={};r.includes("background")&&(m=Kt({attrNameTemplate:"Advanced",blockAttributes:t}));let b={};if(r.includes("border")){const e=Jt({attrNameTemplate:"Advanced",blockAttributes:t}),l=ll({attrNameTemplate:"Advanced",blockAttributes:t});b=a()(e,l)}if(r.includes("positioning")){ue(t[l("BlockPosition")])&&(i.position=t[l("BlockPosition")]);const e=t[l("PositionHorizontalOrientation")],n=t[l("PositionVerticalOrientation")];Object.entries(E).map(([a])=>{let o=ae(a),r={};"custom"!==t[l("BlockWidth")]&&"custom"!==t[l("BlockWidth",o)]||!t[l("BlockCustomWidth",o)]&&!t[l("BlockCustomWidthDecimal",o)]||(ie(t[l("BlockCustomWidthUnit",o)])&&t[l("BlockCustomWidth",o)]?(r.width=parseInt(t[l("BlockCustomWidth",o)],10)+t[l("BlockCustomWidthUnit",o)],r.maxWidth=parseInt(t[l("BlockCustomWidth",o)],10)+t[l("BlockCustomWidthUnit",o)]):se(t[l("BlockCustomWidthUnit",o)])&&t[l("BlockCustomWidthDecimal",o)]&&(r.width=parseFloat(t[l("BlockCustomWidthDecimal",o)])+t[l("BlockCustomWidthUnit",o)],r.maxWidth=parseFloat(t[l("BlockCustomWidthDecimal",o)])+t[l("BlockCustomWidthUnit",o)])),""===pe(t[l("PositionHorizontalOffset",o)])&&""===pe(t[l("PositionHorizontalOffsetDecimal",o)])||(ie(t[l("PositionHorizontalOffsetUnit",o)])&&""!==pe(t[l("PositionHorizontalOffset",o)])?r[e]=parseInt(t[l("PositionHorizontalOffset",o)],10)+t[l("PositionHorizontalOffsetUnit",o)]:se(t[l("PositionHorizontalOffsetUnit",o)])&&""!==pe(t[l("PositionHorizontalOffsetDecimal",o)])&&(r[e]=parseFloat(t[l("PositionHorizontalOffsetDecimal",o)])+t[l("PositionHorizontalOffsetUnit",o)])),""===pe(t[l("PositionVerticalOffset",o)])&&""===pe(t[l("PositionVerticalOffsetDecimal",o)])||(ie(t[l("PositionVerticalOffsetUnit",o)])&&""!==pe(t[l("PositionVerticalOffset",o)])?r[n]=parseInt(t[l("PositionVerticalOffset",o)],10)+t[l("PositionVerticalOffsetUnit",o)]:se(t[l("PositionVerticalOffsetUnit",o)])&&""!==pe(t[l("PositionVerticalOffsetDecimal",o)])&&(r[n]=parseFloat(t[l("PositionVerticalOffsetDecimal",o)])+t[l("PositionVerticalOffsetUnit",o)])),Object.keys(r).length>0&&Object.entries(r).map(([e,t])=>{switch(a){case"desktop":i[e]=t;break;case"tablet":s[e]=t;break;case"mobile":c[e]=t}})})}return i={desktop:i,tablet:s,mobile:c},a()(i,u,p,m,b)};ol.defaultProps={blockAttributes:{},excludePanels:[],includePanels:[]};const rl=ol,il=e=>{const{attributes:t}=e,l=(e,t)=>le("",e,t);let n={},a={},o={};return Object.entries(E).map(([e])=>{let r=ae(e),i={};""!==pe(t[l("columnWidthDecimal",r)])&&(i["--qi-blocks-columns"]=100/parseFloat(t[l("columnWidthDecimal",r)])+"!important"),Object.keys(i).length>0&&Object.entries(i).map(([t,l])=>{switch(e){case"desktop":n[t]=l;break;case"tablet":a[t]=l;break;case"mobile":o[t]=l}})}),{desktop:n,tablet:a,mobile:o}};var sl=l(2404),cl=l.n(sl);const ul=(0,u.createHigherOrderComponent)(e=>class extends i.Component{static defaultProps={clientId:"",attributes:{},setAttributes:()=>{}};componentDidMount(){const{clientId:e,attributes:t,setAttributes:l}=this.props;t.uniqueClass||l({uniqueClass:this.getNewUniqueClass(e)}),this.reInitUniqueClass(!0)}getNewUniqueClass(e){let t="qodef-block-";return this.props.isFullSiteEditor?t="qodef-template-block-":"widget"===this.props.postID&&(t="qodef-widget-block-"),`${t}${e.substring(0,8)}`}hasParent(e,t){let l=!1,n=e?.parentNode;for(;n;){let e=n;if(e&&e?.classList?.contains(t)){l=!0;break}if(!e?.parentNode)break;n=e.parentNode}return l}reInitUniqueClass(e){const{clientId:t,attributes:l,setAttributes:n,isFullSiteEditor:a}=this.props,{uniqueClass:o}=l,r=qiBlocksEditor.qodefGetCurrentBlockElement.getCurrentDocument(),i=this.getNewUniqueClass(t);let s=!1;if(a){if(o.includes("qodef-block")||o.includes("qodef-widget")){const e=r.querySelector(`.${o}`);if(e){this.hasParent(e,"wp-block-post-content")||(s=!0)}}e&&r.addEventListener("paste",()=>{s=!0})}!a&&o.includes("qodef-template-block")&&(s=!0),""!==o&&o!==i&&r.querySelectorAll(`.${o}`).length>1&&(s=!0),s&&n({uniqueClass:i})}render(){return this.reInitUniqueClass(),wp.element.createElement(e,this.props)}},"withUniqueClass"),pl=ul;const ml=qiBlocksEditor.vars.systemFontOptions,bl=e=>{let t=!0;return e||(t=!1),ml&&ml.map(({value:e})=>e).forEach(l=>{""!==l&&e===l&&(t=!1)}),t};function dl(){return dl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var n in l)({}).hasOwnProperty.call(l,n)&&(e[n]=l[n])}return e},dl.apply(null,arguments)}let fl=[],gl={family:[],weight:[],style:[]};const hl=e=>{let t="";return Object.entries(e).map(([e,l])=>{if(e.match(/fontfamily/i)){const e=l.replace(/["']/g,"");!fl.includes(e)&&bl(e)&&(gl.family.push(e),fl.push(e))}e.match(/fontweight/i)&&gl.weight.push(parseInt(l,10)),e.match(/fontstyle/i)&&gl.style.push(l),t+=`${e.replace(/([A-Z])/g,(e,t,l)=>(l>0?"-":"")+e.toLowerCase())}: ${l};`}),t},kl=(0,u.createHigherOrderComponent)(e=>class extends i.Component{addPageStyle(e){if(e){const t=this.postID;let l=this.getPageStyles||[],n={key:this.attributes.uniqueClass,values:[],fonts:[]};fl=[],gl={family:[],weight:[],style:[]},e.forEach((a,o)=>{if(!Object.values(a.styles).every(e=>0===Object.keys(e).length)){const e=["widget","template"].includes(t)?"":`body[class*="-${t}"]`,l=`${e} ${a.selector}`,o=[];"string"!=typeof a.selector&&a.selector.forEach(t=>{t&&o.push(`${e} ${t}`)}),n.values.push({selector:o.length>1?o.join(","):l,styles:hl(a.styles.desktop||""),tablet_styles:hl(a.styles.tablet||""),mobile_styles:hl(a.styles.mobile||""),custom_styles:a.custom_styles||[]}),n.fonts=gl}if(o===e.length-1)if(l&&l.length){let e=!1;l.map((t,a)=>{t.key===n.key&&(e=!0,n.values.length?cl()(t.values,n.values)||(l[a].values=n.values,l[a].fonts=n.fonts):(l[a].values=[],l[a].fonts={family:[],weight:[],style:[]}))}),!e&&n.values.length&&l.push(n)}else"object"==typeof l&&Object.keys(l).length?(l=Object.values(l),l.push(n)):l.push(n);const r=l.filter(e=>e.values.length);qiBlocksEditor.vars.currentPageID=t,qiBlocksEditor.vars.currentPageStyles=r})}}render(){return wp.element.createElement(e,dl({},this.props,{addPageStyle:this.addPageStyle}))}},"withStyles"),_l=(0,u.compose)((0,p.withSelect)(e=>{let t=e("core/editor")?.getCurrentPostId()||"widget";const l=!!e("core/edit-site");let n="desktop";return e("core/edit-post")&&(n="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-post")?.__experimentalGetPreviewDeviceType()?.toLowerCase()),l&&(t="template",n="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-site").__experimentalGetPreviewDeviceType().toLowerCase()),{previewScreen:n,postID:t,getPageStyles:e("qi-blocks/data/with-styles").getOptions(t).data,isFullSiteEditor:l}}),pl,kl);var vl,wl;function yl(){return yl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var n in l)({}).hasOwnProperty.call(l,n)&&(e[n]=l[n])}return e},yl.apply(null,arguments)}const Al=e=>g.createElement("svg",yl({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",width:24,height:24},e),vl||(vl=g.createElement("path",{fill:"none",stroke:"#EE2852",strokeMiterlimit:10,d:"M3.516 3.609h12v12h-12z"})),wl||(wl=g.createElement("path",{fill:"none",stroke:"#EE2852",strokeMiterlimit:10,d:"M8.484 8.719h12v12h-12z"})));var Sl,ql,El;function xl(){return xl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var n in l)({}).hasOwnProperty.call(l,n)&&(e[n]=l[n])}return e},xl.apply(null,arguments)}const Il=e=>g.createElement("svg",xl({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",width:24,height:24},e),Sl||(Sl=g.createElement("path",{fill:"#EE2852",d:"M3 5.009h18v1H3z"})),ql||(ql=g.createElement("path",{fill:"none",stroke:"#EE2852",strokeMiterlimit:10,d:"M9.479 5.509V2.524h5v2.985"})),El||(El=g.createElement("path",{fill:"none",stroke:"#EE2852",strokeMiterlimit:10,d:"M4.5 5.502h15v15.967h-15zM7.661 8.033v11M10.599 7.927v11.001M13.521 8.027v11M16.469 8.027v11"})));var Tl;function Cl(){return Cl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var n in l)({}).hasOwnProperty.call(l,n)&&(e[n]=l[n])}return e},Cl.apply(null,arguments)}const Bl=e=>g.createElement("svg",Cl({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",width:24,height:24},e),Tl||(Tl=g.createElement("path",{fill:"none",stroke:"#EE2852",strokeMiterlimit:10,d:"M4.701 12.458h15.268M9.463 7.691l-4.728 4.767 4.728 4.767-4.852-4.893"})));var Nl;function Pl(){return Pl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var n in l)({}).hasOwnProperty.call(l,n)&&(e[n]=l[n])}return e},Pl.apply(null,arguments)}const Ol=e=>g.createElement("svg",Pl({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",width:24,height:24},e),Nl||(Nl=g.createElement("path",{fill:"none",stroke:"#EE2852",strokeMiterlimit:10,d:"M19.879 12.458H4.611M15.117 7.691l4.728 4.767-4.728 4.767 4.852-4.893"})));class Dl extends i.Component{setSiblingsColumnWidth=()=>{const{clientId:e,attributes:t,siblingsColumn:l,numberOfColumns:n,previewScreen:a}=this.props;if(l&&"desktop"===a){if(n<2)return;let a=(0,p.select)("core/block-editor").getBlockAttributes(e)?.columnWidthDecimal||parseFloat(t.columnWidthDecimal)||"",o=100-(a||0),i=!1,s=r()(l,t=>t.clientId===e);l.forEach((t,r)=>{if(r===n-1&&(i=!0),r===n-2&&s===n-1&&(i=!0),e!==t.clientId){let r=(0,p.select)("core/block-editor").getBlockAttributes(t.clientId)?.columnWidthDecimal||0,s=Math.floor(100*((100-a)/(n-1)+Number.EPSILON))/100;100===a||a>100?s=100:(""===a||a<0)&&(s=""),r&&!["",100].includes(s)&&(i?o&&o>4?s=o:l.forEach(t=>{e!==t.clientId&&(s=Math.floor(100*((100-a)/(n-1)+Number.EPSILON))/100,100===a||a>100?s=100:(""===a||a<0)&&(s=""),(0,p.dispatch)("core/block-editor").updateBlockAttributes(t.clientId,{columnWidthDecimal:s}))}):s=o-r>=0?r:Math.floor(100*(o/(n-1)+Number.EPSILON))/100,o-=r),(0,p.dispatch)("core/block-editor").updateBlockAttributes(t.clientId,{columnWidthDecimal:s})}})}};cloneSelectedBlocks=()=>{const{rootClientId:e,clientId:l,siblingsColumn:n,numberOfColumns:a}=this.props;if(e&&Array.isArray(n)){let e=[];n.forEach(n=>{e.push(n),l===n.clientId&&e.push((0,t.cloneBlock)(n))}),this.updateColumns(e,a+1,"clone")}};removeSelectedBlocks=()=>{const{rootClientId:e,clientId:t,siblingsColumn:l,numberOfColumns:n}=this.props;if(e&&Array.isArray(l)){let e=[];l.forEach(l=>{t!==l.clientId&&e.push(l)}),this.updateColumns(e,n-1,"remove")}};moveSelectedBlocks=e=>{const{rootClientId:t,siblingsColumn:l,currentBlockIndex:n}=this.props;if(t&&Array.isArray(l)&&Number.isInteger(n)){let t=(a=l,o=n,r="left"===e?n-1:n+1,function(e,t,l){const n=t<0?e.length+t:t;if(n>=0&&n<e.length){const n=l<0?e.length+l:l,[a]=e.splice(t,1);e.splice(n,0,a)}}(a=[...a],o,r),a);this.updateColumns(t,null,"move")}var a,o,r};updateColumns=(e,t,l)=>{const{rootClientId:n}=this.props,{replaceInnerBlocks:a,updateBlockAttributes:o}=(0,p.dispatch)("core/block-editor");a(n,e,!0),"move"!==l&&o(n,{columns:t,columnsLayout:`${Math.floor(100/t)}`}),"clone"===l&&e.forEach(e=>{o(e.clientId,{columnWidthDecimal:""})})};render(){const{className:t,attributes:l,setAttributes:n,clientId:o,hasInnerBlocks:r,numberOfColumns:u,currentBlockIndex:p,previewScreen:b}=this.props,{uniqueClass:f,verticalAlign:g,verticalAlignTablet:h,verticalAlignMobile:k,horizontalAlign:_,horizontalAlignTablet:v,horizontalAlignMobile:w,overflow:y,htmlTag:A}=l;let S={className:(0,m.applyFilters)("qi-blocks-filter-advanced-column-block-classes",d()("qodef-gutenberg-column",Q(l),f,{[`qodef-vertical-align--${g}`]:g,[`qodef-vertical-align--tablet--${h}`]:h,[`qodef-vertical-align--mobile--${k}`]:k,[`qodef-horizontal-align--${_}`]:_,[`qodef-horizontal-align--tablet--${v}`]:v,[`qodef-horizontal-align--mobile--${w}`]:w,[`qodef--${y}`]:y,[t]:t}),l),...ee(l)};te(l)&&(S.id=te(l));const E=il({attributes:l}),x=E&&re(oe(E,b),!1),I=Kt({blockAttributes:l}),T=Jt({blockAttributes:l}),C=ll({blockAttributes:l}),B=rl({blockAttributes:l,includePanels:["advanced"]}),N=a()(I,T,C,B),P=rl({blockAttributes:l,includePanels:["motion-effects"]}),O=P&&re(oe(P,b));return this.props.addPageStyle([{selector:`.qodef-gutenberg-section.qodef--template > .qodef-gutenberg-row > .qodef-gutenberg-column.${f}`,styles:(0,m.applyFilters)("qi-blocks-filter-advanced-column-block-styles",a()(E,P),l)},{selector:`.qodef-gutenberg-column.${f} > .qodef-gutenberg-column-inner`,styles:N}]),wp.element.createElement(i.Fragment,null,wp.element.createElement(s.InspectorControls,null,wp.element.createElement(c.TabPanel,{className:"qodef-tab-panel qodef--columns",activeClass:"qodef--active",tabs:[{name:"layout",title:(0,e.__)("Layout","qi-blocks")},{name:"style",title:(0,e.__)("Style","qi-blocks")},{name:"advanced",title:(0,e.__)("Advanced","qi-blocks")}]},t=>wp.element.createElement(wp.element.Fragment,null,"layout"===t.name&&wp.element.createElement(c.BaseControl,{className:"qodef-base-control-container"},wp.element.createElement("div",{className:"qodef-advanced-range-no-rail"},wp.element.createElement(Se,{label:(0,e.__)("Width (%)","qi-blocks"),blockAttributeKey:"columnWidth",setAttributes:n,blockAttributes:l,rangeDecimalMin:4,rangeDecimalMax:b===q&&u>1?96:100,rangeDecimalStep:1,optionType:"decimal",allowScreens:!0,allowUnits:!1,setCustomEventOnChange:this.setSiblingsColumnWidth})),wp.element.createElement(ge,{label:(0,e.__)("Vertical Align","qi-blocks"),blockAttributeKey:"verticalAlign",blockAttributes:l,setAttributes:n,selectOptions:[{label:(0,e.__)("Default","qi-blocks"),value:""},{label:(0,e.__)("Top","qi-blocks"),value:"top"},{label:(0,e.__)("Middle","qi-blocks"),value:"middle"},{label:(0,e.__)("Bottom","qi-blocks"),value:"bottom"},{label:(0,e.__)("Space Between","qi-blocks"),value:"space-between"},{label:(0,e.__)("Space Around","qi-blocks"),value:"space-around"},{label:(0,e.__)("Space Evenly","qi-blocks"),value:"space-evenly"}]}),wp.element.createElement(ge,{label:(0,e.__)("Horizontal Align","qi-blocks"),blockAttributeKey:"horizontalAlign",blockAttributes:l,setAttributes:n,selectOptions:[{label:(0,e.__)("Default","qi-blocks"),value:""},{label:(0,e.__)("Start","qi-blocks"),value:"start"},{label:(0,e.__)("Center","qi-blocks"),value:"center"},{label:(0,e.__)("End","qi-blocks"),value:"end"}]}),wp.element.createElement(c.SelectControl,{label:(0,e.__)("Overflow","qi-blocks"),value:y,options:[{label:(0,e.__)("Default","qi-blocks"),value:""},{label:(0,e.__)("Hidden","qi-blocks"),value:"hidden"}],onChange:e=>n({overflow:e})}),wp.element.createElement(c.SelectControl,{label:(0,e.__)("HTML Tag","qi-blocks"),value:A,options:me("html_tag"),onChange:e=>n({htmlTag:e})}),(0,m.applyFilters)("qi-blocks-filter-advanced-column-additional-options","",this.props)),"style"===t.name&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(c.PanelBody,{title:(0,e.__)("Background","qi-blocks")},wp.element.createElement(zt,{blockAttributes:l,setAttributes:n,previewScreen:b})),wp.element.createElement(c.PanelBody,{title:(0,e.__)("Border","qi-blocks"),initialOpen:!1},wp.element.createElement($t,{blockAttributes:l,setAttributes:n}),wp.element.createElement(el,{blockAttributes:l,setAttributes:n,popup:!0}))),"advanced"===t.name&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(al,{blockAttributes:l,setAttributes:n,excludePanels:["background","border","positioning"]}))))),wp.element.createElement(s.BlockControls,null,wp.element.createElement(c.ToolbarGroup,{className:"qodef-advanced-column-toolbar"},wp.element.createElement(c.ToolbarButton,{icon:wp.element.createElement(Al,null),label:(0,e.__)("Clone Block","qi-blocks"),onClick:this.cloneSelectedBlocks}),u>1&&wp.element.createElement(c.ToolbarButton,{icon:wp.element.createElement(Il,null),label:(0,e.__)("Remove Block","qi-blocks"),onClick:this.removeSelectedBlocks}),wp.element.createElement(c.ToolbarButton,{icon:wp.element.createElement(Bl,null),label:(0,e.__)("Move Left","qi-blocks"),onClick:()=>this.moveSelectedBlocks("left"),isDisabled:0===p}),wp.element.createElement(c.ToolbarButton,{icon:wp.element.createElement(Ol,null),label:(0,e.__)("Move Right","qi-blocks"),onClick:()=>this.moveSelectedBlocks("right"),isDisabled:p===u-1}))),(x||O)&&wp.element.createElement("style",null,x&&`#block-${o} {\n\t\t\t\t\t\t\t\t${x}\n\t\t\t\t\t\t\t}`,O&&`#block-${o} .qodef-gutenberg-column {\n\t\t\t\t\t\t\t\t${O}\n\t\t\t\t\t\t\t}`),(0,i.createElement)(A||"div",S,wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("div",{className:"qodef-gutenberg-column-inner",style:oe(N,b)},wp.element.createElement(s.InnerBlocks,{templateLock:!1,renderAppender:r?void 0:s.InnerBlocks.ButtonBlockAppender})))))}}Dl.defaultProps={previewScreen:q};const Vl=(0,u.compose)(_l,(0,p.withSelect)((e,t)=>{const{clientId:l}=t,{getBlocksByClientId:n,getBlockRootClientId:a,getBlockOrder:o,getBlockIndex:r}=e("core/block-editor"),i=a(l)||null,s=i?n(i)[0].innerBlocks:"";return{rootClientId:i,siblingsColumn:s,hasInnerBlocks:o(l).length>0,numberOfColumns:s?s.length:0,currentBlockIndex:r(l)}}))(Dl);class Rl extends i.Component{render(){const{attributes:e}=this.props,{uniqueClass:t,verticalAlign:l,verticalAlignTablet:n,verticalAlignMobile:a,horizontalAlign:o,horizontalAlignTablet:r,horizontalAlignMobile:c,overflow:u,htmlTag:p}=e;let b={className:(0,m.applyFilters)("qi-blocks-filter-advanced-column-block-classes",d()("qodef-gutenberg-column",Q(e),t,{[`qodef-vertical-align--${l}`]:l,[`qodef-vertical-align--tablet--${n}`]:n,[`qodef-vertical-align--mobile--${a}`]:a,[`qodef-horizontal-align--${o}`]:o,[`qodef-horizontal-align--tablet--${r}`]:r,[`qodef-horizontal-align--mobile--${c}`]:c,[`qodef--${u}`]:u}),e),...ee(e)};return te(e)&&(b.id=te(e)),(0,i.createElement)(p||"div",b,wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("div",{className:"qodef-gutenberg-column-inner"},wp.element.createElement(s.InnerBlocks.Content,null))))}}const Ml=Rl,Ll=G({attrName:"verticalAlign"}),zl=G({attrName:"horizontalAlign"}),Ul=j(),Fl=H({allowBorderRadius:!0}),jl=Y(),Kl=Z({excludePanels:["background","border","positioning"]}),Gl=(0,m.applyFilters)("qi-blocks-filter-advanced-column-attributes",{uniqueClass:{type:"string",default:""},columnWidthDecimal:{type:"number",default:""},columnWidthDecimalTablet:{type:"number",default:""},columnWidthDecimalMobile:{type:"number",default:""},...Ll,...zl,overflow:{type:"string",default:""},htmlTag:{type:"string",default:""},...Ul,...Fl,...jl,...Kl});var Wl;function Hl(){return Hl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var n in l)({}).hasOwnProperty.call(l,n)&&(e[n]=l[n])}return e},Hl.apply(null,arguments)}const $l=e=>g.createElement("svg",Hl({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",width:24,height:24},e),Wl||(Wl=g.createElement("path",{fill:"none",stroke:"#EE2852",strokeMiterlimit:10,d:"M6.806 3.5h10.389v17H6.806z"})));(0,t.registerBlockType)("qi-blocks/column",{icon:wp.element.createElement($l,null),title:(0,e.__)("Advanced Column","qi-blocks"),description:(0,e.__)("Block that displays column","qi-blocks"),category:"qi-blocks",keywords:[(0,e.__)("advanced columns","qi-blocks"),(0,e.__)("qi","qi-blocks")],parent:["qi-blocks/columns"],attributes:Gl,supports:{reusable:!1,inserter:!1,html:!1},edit:Vl,save:Ml})})()})();